Re: [PATCH 6/9] OPP: Extend support for the opp-level beyond required-opps

From: Ulf Hansson
Date: Wed Oct 04 2023 - 05:07:44 EST


On Wed, 4 Oct 2023 at 07:04, Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> On 03-10-23, 14:36, Ulf Hansson wrote:
> > Can you please explain further on this. Rafael has acked those
> > patches, so it should be perfectly fine for you to pick them via your
> > tree too. There is no need to defer them.
>
> Ahh, then it is fine.
>
> > > I will then push out a branch and you can
> > > rebase your patches on top of it ? And then probably Sudeep or someone else can
> > > apply everything ?
> >
> > Or are you suggesting to just take one of the patches from my series,
> > and then I will re-base everything on top?
> >
> > Just trying to understand the way forward. :-)
>
> Applied patches 1-6/9 and the fixed routine looks like this now:
>
> +static int _set_opp_level(struct device *dev, struct opp_table *opp_table,
> + struct dev_pm_opp *opp)
> +{
> + unsigned int level = 0;
> + int ret = 0;
> +
> + if (opp) {
> + if (!opp->level)
> + return 0;
> +
> + level = opp->level;
> + }
> +
> + /* Request a new performance state through the device's PM domain. */
> + ret = dev_pm_domain_set_performance_state(dev, level);
> + if (ret)
> + dev_err(dev, "Failed to set performance state %u (%d)\n", level,
> + ret);
> +
> + return ret;
> +}
>
> Does it look okay now ?

Yes, perfect! Thanks for helping out!

Kind regards
Uffe