[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240702051526.hyqhvmxnywofsjp2@vireshk-i7>
Date: Tue, 2 Jul 2024 10:45:26 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Ulf Hansson <ulf.hansson@...aro.org>
Cc: Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
Stephen Boyd <sboyd@...nel.org>, Nikunj Kela <nkela@...cinc.com>,
Prasad Sodagudi <psodagud@...cinc.com>, linux-pm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-tegra@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] OPP: Fix support for required OPPs for multiple PM
domains
On 01-07-24, 17:17, Viresh Kumar wrote:
> What about this patch instead ?
>
> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> index 5f4598246a87..2086292f8355 100644
> --- a/drivers/opp/core.c
> +++ b/drivers/opp/core.c
> @@ -1091,7 +1091,8 @@ static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
> if (devs[index]) {
> required_opp = opp ? opp->required_opps[index] : NULL;
>
> - ret = dev_pm_opp_set_opp(devs[index], required_opp);
> + /* Set required OPPs forcefully */
> + ret = dev_pm_opp_set_opp_forced(devs[index], required_opp, true);
Maybe better to do just this instead:
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 5f4598246a87..9484acbeaa66 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -1386,7 +1386,12 @@ int dev_pm_opp_set_opp(struct device *dev, struct dev_pm_opp *opp)
return PTR_ERR(opp_table);
}
- ret = _set_opp(dev, opp_table, opp, NULL, false);
+ /*
+ * For a genpd's OPP table, we always want to set the OPP (and
+ * performance level) and let the genpd core take care of aggregating
+ * the votes. Set `forced` to true for a genpd here.
+ */
+ ret = _set_opp(dev, opp_table, opp, NULL, opp_table->is_genpd);
dev_pm_opp_put_opp_table(opp_table);
return ret;
--
viresh
Powered by blists - more mailing lists