[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a912c8b2-080d-7ab7-670b-b687ec3a2c92@codeaurora.org>
Date: Mon, 17 Jun 2019 09:37:02 +0530
From: Rajendra Nayak <rnayak@...eaurora.org>
To: Viresh Kumar <viresh.kumar@...aro.org>, swboyd@...omium.org,
vincent.guittot@...aro.org, mturquette@...libre.com
Cc: linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-pm@...r.kernel.org, linux-serial@...r.kernel.org,
linux-spi@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-scsi@...r.kernel.org, ulf.hansson@...aro.org,
dianders@...omium.org, rafael@...nel.org
Subject: Re: [RFC v2 01/11] OPP: Don't overwrite rounded clk rate
On 6/17/2019 9:20 AM, Viresh Kumar wrote:
> On 14-06-19, 10:57, Viresh Kumar wrote:
>> Hmm, so this patch won't break anything and I am inclined to apply it again :)
>>
>> Does anyone see any other issues with it, which I might be missing ?
>
> I have updated the commit log a bit more to clarify on things, please let me
> know if it looks okay.
>
> opp: Don't overwrite rounded clk rate
>
> The OPP table normally contains 'fmax' values corresponding to the
> voltage or performance levels of each OPP, but we don't necessarily want
> all the devices to run at fmax all the time. Running at fmax makes sense
> for devices like CPU/GPU, which have a finite amount of work to do and
> since a specific amount of energy is consumed at an OPP, its better to
> run at the highest possible frequency for that voltage value.
>
> On the other hand, we have IO devices which need to run at specific
> frequencies only for their proper functioning, instead of maximum
> possible frequency.
>
> The OPP core currently roundup to the next possible OPP for a frequency
> and select the fmax value. To support the IO devices by the OPP core,
> lets do the roundup to fetch the voltage or performance state values,
> but not use the OPP frequency value. Rather use the value returned by
> clk_round_rate().
>
> The current user, cpufreq, of dev_pm_opp_set_rate() already does the
> rounding to the next OPP before calling this routine and it won't
> have any side affects because of this change.
Looks good to me. Should this also be documented someplace that dev_pm_opp_set_rate()
would not be able to distinguish between its users trying to scale CPU/GPU's vs IO
devices, so its the callers responsibility to round it accordingly before calling the
API?
>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>
> Signed-off-by: Rajendra Nayak <rnayak@...eaurora.org>
> [ Viresh: Massaged changelog and use temp_opp variable instead ]
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
>
>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
Powered by blists - more mailing lists