[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd5b94fb-ed9a-7745-a0cd-cfc3b81d676f@codeaurora.org>
Date: Wed, 21 Nov 2018 12:21:18 +0530
From: Rajendra Nayak <rnayak@...eaurora.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: ulf.hansson@...aro.org, "Rafael J. Wysocki" <rjw@...ysocki.net>,
Kevin Hilman <khilman@...nel.org>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
Stephen Boyd <sboyd@...nel.org>, Nishanth Menon <nm@...com>,
niklas.cassel@...aro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] PM / Domains: Propagate performance state updates
On 11/21/2018 12:06 PM, Viresh Kumar wrote:
> 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.
Thanks, yes, this does seem to work.
>
> 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);
> }
>
Powered by blists - more mailing lists