From: Rajendra Nayak <rnayak@codeaurora.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: ulf.hansson@linaro.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Kevin Hilman <khilman@kernel.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
linux-pm@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
Stephen Boyd <sboyd@kernel.org>, Nishanth Menon <nm@ti.com>,
niklas.cassel@linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] PM / Domains: Propagate performance state updates
Date: Wed, 21 Nov 2018 12:21:18 +0530 [thread overview]
Message-ID: <bd5b94fb-ed9a-7745-a0cd-cfc3b81d676f@codeaurora.org> (raw)
In-Reply-To: <20181121063646.37bha3vomxvzazzn@vireshk-i7>
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);
> }
>
prev parent reply other threads:[~2018-11-21 6:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 6:36 [PATCH 0/4] PM / Domains: Allow performance state propagation Viresh Kumar
2018-11-05 6:36 ` [PATCH 1/4] OPP: Add dev_pm_opp_xlate_performance_state() helper Viresh Kumar
2018-11-21 5:04 ` Rajendra Nayak
2018-11-21 5:17 ` Viresh Kumar
2018-11-21 6:06 ` Viresh Kumar
2018-11-21 6:18 ` Rajendra Nayak
2018-11-22 6:08 ` Viresh Kumar
2018-11-23 9:11 ` Viresh Kumar
2018-11-23 9:55 ` Viresh Kumar
2018-11-05 6:36 ` [PATCH 2/4] PM / Domains: Save OPP table pointer in genpd Viresh Kumar
2018-11-05 6:36 ` [PATCH 3/4] PM / Domains: Factorize dev_pm_genpd_set_performance_state() Viresh Kumar
2018-11-05 6:36 ` [PATCH 4/4] PM / Domains: Propagate performance state updates Viresh Kumar
2018-11-21 5:03 ` Rajendra Nayak
2018-11-21 5:16 ` Viresh Kumar
2018-11-21 5:31 ` Rajendra Nayak
2018-11-21 5:41 ` Viresh Kumar
2018-11-21 5:42 ` Rajendra Nayak
2018-11-21 6:36 ` Viresh Kumar
2018-11-21 6:51 ` Rajendra Nayak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bd5b94fb-ed9a-7745-a0cd-cfc3b81d676f@codeaurora.org \
--to=rnayak@codeaurora.org \
--cc=khilman@kernel.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=niklas.cassel@linaro.org \
--cc=nm@ti.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=sboyd@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).