]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
PM / Domains: Make genpd performance states orthogonal to the idlestates
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 11 Dec 2018 10:04:55 +0000 (11:04 +0100)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 14 Dec 2018 10:49:10 +0000 (16:19 +0530)
commit68de2fe57a8f2746db1064d39c697595cd76bb16
treeb42a13a9d2b1a88a703b05786a787643c7e91995
parent534245cc69c2a3597d8ed0e7782ae3f563e92c68
PM / Domains: Make genpd performance states orthogonal to the idlestates

It's quite questionable whether genpd internally should care about if the
corresponding PM domain for a device is powered on, as to allow setting a
new performance state for it. The assumptions creates an unnecessary
limitation at this point, for both consumers and providers, but more
importantly it also makes the code more complicated.

Therefore, let's simplify the code to allow setting a performance state, by
invoking the ->set_performance_state() callback, no matter whether the PM
domain is powered on or off.

Do note, this change means genpd providers needs to restore the performance
state themselves during power on, via the ->power_on() callback. Moreover,
they may also need to check that the PM domain is powered on, from their
->set_performance_state() callback, before deciding to update the state.

Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/base/power/domain.c