Re: [PATCH 3/3] PM: domains: Add a ->dev_get_performance_state() callback to genpd

From: Dmitry Osipenko
Date: Tue Sep 07 2021 - 04:10:20 EST


07.09.2021 06:40, Viresh Kumar пишет:
> On 06-09-21, 17:35, Dmitry Osipenko wrote:
>> Viresh, are you okay with going back to the variant with the
>> dev_pm_opp_sync() helper?
>
> I have missed a lot of stuff in between and wasn't following this
> carefully as I thought my half was resolved :)
>
> Can you describe what to propose to do again ? From what I remember,
> doing this one time from probe() is okay, doing it from
> suspend/resume, not so much.

Hmm.. actually, it's not a problem to set up the performance state from
probe() now with that recent change that was made to the PD core. [1]

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3c5a272202c28c1f9309566f206ba40787246149

And then we indeed don't need neither the dev_get_performance_state()
callback, nor the dev_pm_opp_sync() helper.

The devm_tegra_core_dev_init_opp_table() already supports performance
state syncing, so I will just need to call it after the RPM setup made
by consumer driver, allowing PD core to set the rpm_pstate. I already
gave it a quick test and it works perfectly.

Ulf, are you okay with abandoning the dev_get_performance_state()
callback? We don't need it anymore.