linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Perret <quentin.perret@arm.com>
To: Douglas Raillard <douglas.raillard@arm.com>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-pm@vger.kernel.org, rjw@rjwysocki.net,
	viresh.kumar@linaro.org, agross@kernel.org
Subject: Re: [PATCH 1/2] cpufreq: drivers: Enable frequency invariance in qcom-cpufreq-hw
Date: Fri, 9 Aug 2019 11:37:06 +0100	[thread overview]
Message-ID: <20190809103704.fatayhzso2b62fmx@queper01-lin> (raw)
In-Reply-To: <14762a81-a81d-d05f-b42a-495dacb28168@arm.com>

On Friday 09 Aug 2019 at 11:16:12 (+0100), Douglas Raillard wrote:
> Hi Quentin,
> 
> On 8/8/19 6:32 PM, Quentin Perret wrote:
> > Hi Douglas,
> > 
> > On Thursday 08 Aug 2019 at 14:18:57 (+0100), Douglas RAILLARD wrote:
> > > Add calls to arch_set_freq_scale() in qcom-cpufreq-hw driver to enable
> > > frequency invariance.
> > 
> > Is there a patch 2/2 ?
> 
> That slipped through when format-patch-ing unrelated commits, there is no 2nd patch.
> 
> > > 
> > > Signed-off-by: Douglas RAILLARD <douglas.raillard@arm.com>
> > > ---
> > >   drivers/cpufreq/qcom-cpufreq-hw.c | 10 +++++++++-
> > >   1 file changed, 9 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> > > index 4b0b50403901..3bd3b8b268d9 100644
> > > --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> > > +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> > > @@ -34,9 +34,12 @@ static int qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy,
> > >   					unsigned int index)
> > >   {
> > >   	void __iomem *perf_state_reg = policy->driver_data;
> > > +	unsigned long freq = policy->freq_table[index].frequency;
> > >   	writel_relaxed(index, perf_state_reg);
> > > +	arch_set_freq_scale(policy->related_cpus, freq,
> > > +			    policy->cpuinfo.max_freq);
> > >   	return 0;
> > >   }
> > > @@ -63,6 +66,7 @@ static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
> > >   {
> > >   	void __iomem *perf_state_reg = policy->driver_data;
> > >   	int index;
> > > +	unsigned long freq;
> > >   	index = policy->cached_resolved_idx;
> > >   	if (index < 0)
> > > @@ -70,7 +74,11 @@ static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
> > >   	writel_relaxed(index, perf_state_reg);
> > > -	return policy->freq_table[index].frequency;
> > > +	freq = policy->freq_table[index].frequency;
> > > +	arch_set_freq_scale(policy->related_cpus, freq,
> > > +			    policy->cpuinfo.max_freq);
> > > +
> > > +	return freq;
> > >   }
> > >   static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
> > > -- 
> > > 2.22.0
> > 
> > Reviewed-by: Quentin Perret <quentin.perret@arm.com>
> > 
> > Thanks,
> > Quentin
> > 
> 
> Thanks,
> Douglas

Actually, one nit, the $subject should probably be formatted as:

  cpufreq: qcom-hw: invoke frequency-invariance setter function

for consistency with other patches in this area.

Thanks,
Quentin

  reply	other threads:[~2019-08-09 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 13:18 [PATCH 1/2] cpufreq: drivers: Enable frequency invariance in qcom-cpufreq-hw Douglas RAILLARD
2019-08-08 17:32 ` Quentin Perret
2019-08-09 10:16   ` Douglas Raillard
2019-08-09 10:37     ` Quentin Perret [this message]
2019-08-19  6:57       ` Viresh Kumar

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=20190809103704.fatayhzso2b62fmx@queper01-lin \
    --to=quentin.perret@arm.com \
    --cc=agross@kernel.org \
    --cc=douglas.raillard@arm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --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).