From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Markus Mayer <markus.mayer@broadcom.com>,
Markus Mayer <code@mmayer.net>,
Power Management List <linux-pm@vger.kernel.org>,
Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] cpufreq: brcmstb-avs-cpufreq: properly retrieve P-state upon suspend
Date: Thu, 2 Feb 2017 09:03:15 +0530 [thread overview]
Message-ID: <20170202033315.GC7458@vireshk-i7> (raw)
In-Reply-To: <13652921.6keQ978gf5@aspire.rjw.lan>
On 02-02-17, 00:44, Rafael J. Wysocki wrote:
> On Tuesday, January 31, 2017 10:53:01 AM Markus Mayer wrote:
> > On 5 January 2017 at 20:11, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > On 19-12-16, 12:10, Markus Mayer wrote:
> > >> From: Markus Mayer <mmayer@broadcom.com>
> > >>
> > >> The AVS GET_PMAP command does return a P-state along with the P-map
> > >> information. However, that P-state is the initial P-state when the
> > >> P-map was first downloaded to AVS. It is *not* the current P-state.
> > >>
> > >> Therefore, we explicitly retrieve the P-state using the GET_PSTATE
> > >> command.
> > >>
> > >> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
> > >> ---
> > >> drivers/cpufreq/brcmstb-avs-cpufreq.c | 13 ++++++++++++-
> > >> 1 file changed, 12 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c
> > >> index 2c6e325..c943606 100644
> > >> --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c
> > >> +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c
> > >> @@ -784,8 +784,19 @@ static int brcm_avs_target_index(struct cpufreq_policy *policy,
> > >> static int brcm_avs_suspend(struct cpufreq_policy *policy)
> > >> {
> > >> struct private_data *priv = policy->driver_data;
> > >> + int ret;
> > >> +
> > >> + ret = brcm_avs_get_pmap(priv, &priv->pmap);
> > >> + if (ret)
> > >> + return ret;
> > >>
> > >> - return brcm_avs_get_pmap(priv, &priv->pmap);
> > >> + /*
> > >> + * We can't use the P-state returned by brcm_avs_get_pmap(), since
> > >> + * that's the initial P-state from when the P-map was downloaded to the
> > >> + * AVS co-processor, not necessarily the P-state we are running at now.
> > >> + * So, we get the current P-state explicitly.
> > >> + */
> > >> + return brcm_avs_get_pstate(priv, &priv->pmap.state);
> > >> }
> > >>
> > >> static int brcm_avs_resume(struct cpufreq_policy *policy)
> > >
> > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> >
> > Just wanted to follow up to see if this has been or will be picked up
> > for 4.10?
>
> For 4.10? No way.
I also thought it might get into 4.10 as these were fixes. Else he would be
required to push them via the 4.10 stable kernel.
--
viresh
next prev parent reply other threads:[~2017-02-02 3:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 20:10 [PATCH 0/2] cpufreq: brcmstb-avs-cpufreq: properly retrieve P-state upon suspend Markus Mayer
2016-12-19 20:10 ` [PATCH 1/2] cpufreq: brcmstb-avs-cpufreq: extend sysfs entry brcm_avs_pmap Markus Mayer
2017-01-06 4:04 ` Viresh Kumar
2016-12-19 20:10 ` [PATCH 2/2] cpufreq: brcmstb-avs-cpufreq: properly retrieve P-state upon suspend Markus Mayer
2017-01-06 4:11 ` Viresh Kumar
2017-01-31 18:53 ` Markus Mayer
2017-02-01 23:44 ` Rafael J. Wysocki
2017-02-01 23:59 ` Markus Mayer
2017-02-02 3:33 ` Viresh Kumar [this message]
2017-02-02 11:22 ` Rafael J. Wysocki
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=20170202033315.GC7458@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=code@mmayer.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=markus.mayer@broadcom.com \
--cc=rjw@rjwysocki.net \
/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