Re: [PATCH 13/16] OPP: Extend dev_pm_opp_data with OPP provider support

From: Viresh Kumar
Date: Thu Jun 08 2023 - 01:35:03 EST


On 07-06-23, 14:46, Ulf Hansson wrote:
> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> index 79b4b44ced3e..81a3418e2eaf 100644
> --- a/drivers/opp/core.c
> +++ b/drivers/opp/core.c
> @@ -1112,6 +1112,15 @@ static int _set_opp(struct device *dev, struct opp_table *opp_table,
> return ret;
> }
>
> + if (opp->provider == DEV_PM_OPP_TYPE_GENPD) {
> + ret = dev_pm_genpd_set_performance_state(dev, opp->level);
> + if (ret) {
> + dev_err(dev, "Failed to set performance level: %d\n",
> + ret);
> + return ret;
> + }
> + }
> +

I don't like this :)

We already have these calls in place from within _set_required_opps(), and we
should try to get this done in a way that those calls themselves get the
performance state configured.

--
viresh