diff mbox series

pmdomain: arm: Avoid polling for scmi_perf_domain

Message ID 20231127135033.136442-1-ulf.hansson@linaro.org (mailing list archive)
State New, archived
Headers show
Series pmdomain: arm: Avoid polling for scmi_perf_domain | expand

Commit Message

Ulf Hansson Nov. 27, 2023, 1:50 p.m. UTC
It was a mistake to prefer polling based mode when setting a performance
level for a domain. Let's instead rely on the protocol to decide what is
best and thus avoid polling when possible.

Reported-by: Nikunj Kela <nkela@quicinc.com>
Fixes: 2af23ceb8624 ("pmdomain: arm: Add the SCMI performance domain")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/pmdomain/arm/scmi_perf_domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sudeep Holla Nov. 27, 2023, 3:05 p.m. UTC | #1
On Mon, Nov 27, 2023 at 02:50:33PM +0100, Ulf Hansson wrote:
> It was a mistake to prefer polling based mode when setting a performance
> level for a domain. Let's instead rely on the protocol to decide what is
> best and thus avoid polling when possible.
>
> Reported-by: Nikunj Kela <nkela@quicinc.com>
> Fixes: 2af23ceb8624 ("pmdomain: arm: Add the SCMI performance domain")

Ah, I hadn't even noticed before  :). Anyways,

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

--
Regards,
Sudeep
Ulf Hansson Nov. 27, 2023, 3:33 p.m. UTC | #2
On Mon, 27 Nov 2023 at 16:05, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Mon, Nov 27, 2023 at 02:50:33PM +0100, Ulf Hansson wrote:
> > It was a mistake to prefer polling based mode when setting a performance
> > level for a domain. Let's instead rely on the protocol to decide what is
> > best and thus avoid polling when possible.
> >
> > Reported-by: Nikunj Kela <nkela@quicinc.com>
> > Fixes: 2af23ceb8624 ("pmdomain: arm: Add the SCMI performance domain")
>
> Ah, I hadn't even noticed before  :). Anyways,
>
> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

Thanks, applied for fixes!

Kind regards
Uffe
diff mbox series

Patch

diff --git a/drivers/pmdomain/arm/scmi_perf_domain.c b/drivers/pmdomain/arm/scmi_perf_domain.c
index bc3f78abb6da..709bbc448fad 100644
--- a/drivers/pmdomain/arm/scmi_perf_domain.c
+++ b/drivers/pmdomain/arm/scmi_perf_domain.c
@@ -35,7 +35,7 @@  scmi_pd_set_perf_state(struct generic_pm_domain *genpd, unsigned int state)
 	if (!state)
 		return -EINVAL;
 
-	ret = pd->perf_ops->level_set(pd->ph, pd->domain_id, state, true);
+	ret = pd->perf_ops->level_set(pd->ph, pd->domain_id, state, false);
 	if (ret)
 		dev_warn(&genpd->dev, "Failed with %d when trying to set %d perf level",
 			 ret, state);