]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pmdomain: arm: Fix -EINVAL from scmi_pd_set_perf_state() on state 0
authorPraveen Talari <praveen.talari@oss.qualcomm.com>
Tue, 4 Aug 2026 19:57:39 +0000 (01:27 +0530)
committerUlf Hansson <ulfh@kernel.org>
Mon, 10 Aug 2026 13:59:19 +0000 (15:59 +0200)
Currently, scmi_pd_set_perf_state() treats a performance state of 0 as
invalid and returns -EINVAL. As a result, devices attached to SCMI
performance domains can report failures when relinquishing their
performance vote.

The OPP framework use performance state 0 to indicate that no performance
vote is required. For example, dev_pm_opp_set_rate(dev, 0) is commonly
used (by firmware or linux)  when a device is runtime suspended.

A zero performance state does not require any SCMI performance request
to be sent. Treat it as a no-op and return success instead of reporting
an error.

Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
Fixes: 2af23ceb8624 ("pmdomain: arm: Add the SCMI performance domain")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
drivers/pmdomain/arm/scmi_perf_domain.c

index 3693423459c9cc74a0f4f4ae67643e095729f8eb..e390f902a44426514a6cd9cd610e82ed67f0e9a0 100644 (file)
@@ -33,7 +33,7 @@ scmi_pd_set_perf_state(struct generic_pm_domain *genpd, unsigned int state)
                return 0;
 
        if (!state)
-               return -EINVAL;
+               return 0;
 
        ret = pd->perf_ops->level_set(pd->ph, pd->domain_id, state, false);
        if (ret)