On 21-11-18, 11:12, Rajendra Nayak wrote: > And the reason for that seems to be that we update the genpd status to > GPD_STATE_ACTIVE > *after* we try to set the performance state, so we always hit this check > which bails out > thinking the genpd is not ON.
Thanks for looking at it. Here is the (untested) fix, please try it out. diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 84c13695af65..92be4a224b45 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -250,9 +250,6 @@ static int _genpd_set_performance_state(struct generic_pm_domain *genpd, unsigned int mstate; int ret; - if (!genpd_status_on(genpd)) - goto out; - /* Propagate to masters of genpd */ list_for_each_entry(link, &genpd->slave_links, slave_node) { master = link->master; @@ -286,7 +283,6 @@ static int _genpd_set_performance_state(struct generic_pm_domain *genpd, if (ret) goto err; -out: genpd->performance_state = state; return 0; @@ -361,6 +357,11 @@ static int _genpd_reeval_performance_state(struct generic_pm_domain *genpd, return 0; update_state: + if (!genpd_status_on(genpd)) { + genpd->performance_state = state; + return 0; + } + return _genpd_set_performance_state(genpd, state, depth); } -- viresh