[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190410112516.gnh77jcwawvld6et@vireshk-i7>
Date: Wed, 10 Apr 2019 16:55:16 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Sibi Sankar <sibis@...eaurora.org>
Cc: robh+dt@...nel.org, andy.gross@...aro.org,
myungjoo.ham@...sung.com, kyungmin.park@...sung.com,
rjw@...ysocki.net, nm@...com, sboyd@...nel.org,
georgi.djakov@...aro.org, bjorn.andersson@...aro.org,
david.brown@...aro.org, mark.rutland@....com,
linux-kernel@...r.kernel.org, linux-arm-msm-owner@...r.kernel.org,
devicetree@...r.kernel.org, rnayak@...eaurora.org,
cw00.choi@...sung.com, linux-pm@...r.kernel.org,
evgreen@...omium.org, daidavid1@...eaurora.org,
dianders@...omium.org
Subject: Re: [PATCH RFC 7/9] cpufreq: qcom: Add support to update cpu node's
OPP tables
On 10-04-19, 16:46, Sibi Sankar wrote:
> On 2019-04-10 16:03, Viresh Kumar wrote:
> > On 28-03-19, 20:58, Sibi Sankar wrote:
> > > Add support to parse and update OPP tables attached to the cpu nodes.
> > >
> > > Signed-off-by: Sibi Sankar <sibis@...eaurora.org>
> > > ---
> > > drivers/cpufreq/qcom-cpufreq-hw.c | 29 +++++++++++++++++++++++++++--
> > > 1 file changed, 27 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c
> > > b/drivers/cpufreq/qcom-cpufreq-hw.c
> > > index 4b0b50403901..5c268dd2346c 100644
> > > --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> > > +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> > > @@ -73,6 +73,25 @@ static unsigned int
> > > qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
> > > return policy->freq_table[index].frequency;
> > > }
> > >
> > > +static int qcom_find_update_opp(struct device *cpu_dev, unsigned
> > > long freq,
> > > + unsigned long volt)
> > > +{
> > > + int ret;
> > > + struct dev_pm_opp *opp;
> > > +
> > > + opp = dev_pm_opp_find_freq_exact(cpu_dev, freq, true);
> > > + if (IS_ERR(opp)) {
> > > + ret = dev_pm_opp_add(cpu_dev, freq, volt);
> >
> > With my comment on the other patch, you can just call
> > dev_pm_opp_update_voltage() and if that fails then call
> > dev_pm_opp_add().
>
> yeah that should simplify things.
>
> Also through the above approach I cannot
> really disable opps that the OSM does not
> support. I can only try enabling opp's that
> OSM supports. But that would require all
> opp's nodes to start with "disabled" but
> that is not allowed I guess.
Yeah maybe add all OPPs from DT, disable all of them and then only modify and
enable the ones you need.
--
viresh
Powered by blists - more mailing lists