Re: [PATCH v6 4/5] cpufreq: qcom: Update the bandwidth levels on frequency change

From: Matthias Kaehlcke
Date: Tue Jun 16 2020 - 18:12:03 EST


Hi Sibi,

after doing the review I noticed that Viresh replied on the cover letter
that he picked the series up for v5.9, so I'm not sure if it makes sense
to send a v7.

On Wed, Jun 17, 2020 at 02:35:00AM +0530, Sibi Sankar wrote:

> > > @@ -112,7 +178,7 @@ static int qcom_cpufreq_hw_read_lut(struct
> > > device *cpu_dev,
> > >
> > > if (freq != prev_freq && core_count != LUT_TURBO_IND) {
> > > table[i].frequency = freq;
> > > - dev_pm_opp_add(cpu_dev, freq * 1000, volt);
> > > + qcom_cpufreq_update_opp(cpu_dev, freq, volt);
> >
> > This is the cross-validation mentioned above, right? Shouldn't it
> > include
> > a check of the return value?
>
> Yes, this is the cross-validation step,
> we adjust the voltage if opp-tables are
> present/added successfully and enable
> them, else we would just do a add opp.
> We don't want to exit early on a single
> opp failure. We will error out a bit
> later if the opp-count ends up to be
> zero.

At least an error/warning message would seem convenient when adjusting/adding
an OPP fails, otherwise you would only notice by looking at the sysfs
attributes (if you'd even spot a single/few OPPs to be missing).