[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220505094547.skkwuthq454ajo7l@vireshk-i7>
Date: Thu, 5 May 2022 15:15:47 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Rafael Wysocki <rjw@...ysocki.net>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
linux-pm@...r.kernel.org, Rex-BC Chen <rex-bc.chen@...iatek.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] cpufreq: Avoid unnecessary frequency updates due to
mismatch
On 05-05-22, 11:40, Vincent Guittot wrote:
> On Thu, 5 May 2022 at 10:28, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> >
> > On 05-05-22, 10:21, Vincent Guittot wrote:
> > > Part of your problem is that cpufreq use khz whereas clock uses hz
> >
> > Not in this case at least as the value mentioned in OPP table DT is in
> > Hz.
>
> But dev_pm_opp_init_cpufreq_table make it kHz anyway
Yes.
> > > Would it be better to do something like below in cpufreq_generic_get
> > >
> > > (clk_get_rate(policy->clk) + 500) / 1000
> > >
> > > so you round to closest instead of always floor rounding
> >
> > That would be a fine thing to do anyway, though I am not sure if it
> > will fix the problem at hand.
> >
> > If the hardware returns 499,999,499 Hz, we will still have the
> > problem.
>
> But in this case, cpufreq table should use 499,999Khz IMO.
I did think about it earlier, but then left it.
> We already
> have OPP/cpufreq table being updated at boot with actual value.
I don't think we update the frequency values there yet, but yes one
way to fix it is via DT.
--
viresh
Powered by blists - more mailing lists