[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201222085940.y625zxee4tevbqm5@vireshk-i7>
Date: Tue, 22 Dec 2020 14:29:40 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Dmitry Osipenko <digetx@...il.com>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Peter Geis <pgwipeout@...il.com>,
Nicolas Chauvet <kwizart@...il.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Kevin Hilman <khilman@...nel.org>,
Peter De Schrijver <pdeschrijver@...dia.com>,
Viresh Kumar <vireshk@...nel.org>,
Stephen Boyd <sboyd@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-media@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-clk@...r.kernel.org
Subject: Re: [PATCH v2 14/48] opp: Filter out OPPs based on availability of a
required-OPP
On 17-12-20, 21:06, Dmitry Osipenko wrote:
> A required OPP may not be available, and thus, all OPPs which are using
> this required OPP should be unavailable too.
>
> Signed-off-by: Dmitry Osipenko <digetx@...il.com>
> ---
> drivers/opp/core.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
Please send a separate patchset for fixes, as these can also go to 5.11 itself.
> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> index d9feb7639598..3d02fe33630b 100644
> --- a/drivers/opp/core.c
> +++ b/drivers/opp/core.c
> @@ -1588,7 +1588,7 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp,
> struct opp_table *opp_table, bool rate_not_available)
> {
> struct list_head *head;
> - int ret;
> + int i, ret;
>
> mutex_lock(&opp_table->lock);
> head = &opp_table->opp_list;
> @@ -1615,6 +1615,15 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp,
> __func__, new_opp->rate);
> }
>
> + for (i = 0; i < opp_table->required_opp_count && new_opp->available; i++) {
> + if (new_opp->required_opps[i]->available)
> + continue;
> +
> + new_opp->available = false;
> + dev_warn(dev, "%s: OPP not supported by required OPP %pOF (%lu)\n",
> + __func__, new_opp->required_opps[i]->np, new_opp->rate);
Why not just break from here ?
> + }
> +
> return 0;
> }
>
> --
> 2.29.2
--
viresh
Powered by blists - more mailing lists