Re: [PATCH 2/4] OPP: Add support for parsing the 'opp-sustainable' property

Quentin Perret
2020-10-30T11:48:40Z

Hi Lukasz,

On Wednesday 28 Oct 2020 at 14:08:45 (+0000), Lukasz Luba wrote:
> +unsigned long dev_pm_opp_get_sustainable_opp_freq(struct device *dev)
> +{
> + struct opp_table *opp_table;
> + unsigned long freq = 0;
> +
> + opp_table = _find_opp_table(dev);
> + if (IS_ERR(opp_table))
> + return 0;
> +
> + if (opp_table->sustainable_opp && opp_table->sustainable_opp->available)
> + freq = dev_pm_opp_get_freq(opp_table->sustainable_opp);
> +
> + dev_pm_opp_put_opp_table(opp_table);
> +
> + return freq;
> +}
> +EXPORT_SYMBOL_GPL(dev_pm_opp_get_sustainable_opp_freq);

I'm guessing this is what IPA will use to find out what the sustainable
frequency is right?

Is PM_OPP the right place for that? It feels odd IPA will get the EM
from one place, which includes the performance state, and the sustained
OPP from another. Should we move that to PM_EM instead?

Thanks,
Quentin