]> www.infradead.org Git - users/jedix/linux-maple.git/commit
OPP: Fix support for required OPPs for multiple PM domains
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 22 Aug 2024 22:45:38 +0000 (00:45 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 23 Aug 2024 09:57:44 +0000 (11:57 +0200)
commit9ec87c5957ea9bf68d36f5e098605b585b2571e4
treede8a80441ea4e1ce867e960af63d22da3fba2378
parent52dd070c62e4ae2b5e7411b920e3f7a64235ecfb
OPP: Fix support for required OPPs for multiple PM domains

It has turned out that having _set_required_opps() to recursively call
dev_pm_opp_set_opp() to set the required OPPs, doesn't really work as well
as we expected.

More precisely, at each recursive call to dev_pm_opp_set_opp() we are
changing an OPP for a required_dev that belongs to a required-OPP table.
The problem with this, is that we may have several devices sharing the same
required-OPP table, which leads to an incorrect behaviour in regards to
aggregating the per device votes.

To fix the problem for a required-OPP table belonging to a PM domain, which
is the only existing usecase for now, let's simply replace the call to
dev_pm_opp_set_opp() in _set_required_opps() by a call to _set_opp_level().

Moving forward we may potentially need to add support for other types of
required-OPP tables. In this case, the aggregation needs to be thought of.

Fixes: e37440e7e2c2 ("OPP: Call dev_pm_opp_set_opp() for required OPPs")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20240822224547.385095-2-ulf.hansson@linaro.org
drivers/opp/core.c