Commit 4033df20 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres Committed by Isaac Manjarres
Browse files

ANDROID: OPP: Fix incorrectly backported logic in _set_opp_level()



Commit b50a013d ("BACKPORT: OPP: Extend support for the opp-level
beyond required-opps") used dev_pm_genpd_set_performance_state()
as a substitute for dev_pm_domain_set_performance_state(), since
introducing dev_pm_domain_set_performance_state() required breaking the
ABI on this branch.

However, directly invoking dev_pm_genpd_set_performance_state() is not
equivalent to dev_pm_domain_set_performance_state(), as the latter
only invokes a PM domain's set_performance_state callback if the device
it is invoked on uses a PM domain, and if that PM domain supports that
callback. If that check fails, then the invocation is simply a nop, and
no error code is returned.

In contrast, dev_pm_genpd_set_performance_state() checks to ensure that the
device uses a PM domain, and that the PM domain is a generic PM domain.
If that is not the case, then the invocation returns an error which is
then propagated up the call chain.

Therefore, fix _set_opp_level() to function as a nop for devices without
PM domains to align it to its original intent.

Bug: 394178898
Fixes: b50a013d ("BACKPORT: OPP: Extend support for the opp-level beyond required-opps")
Change-Id: I664d45168404d62aecf59a0afcd2e001d6b7a247
Signed-off-by: default avatarIsaac J. Manjarres <isaacmanjarres@google.com>
parent 1cf6be70
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment