Thread (29 messages) flat view 29 messages, 3 authors, 2021-09-10

Re: [PATCH 1/3] PM: domains: Drop the performance state vote for a device at detach

From: Dmitry Osipenko <digetx@gmail.com>
Date: 2021-09-09 14:36:50
Also in: linux-arm-kernel, lkml

07.09.2021 13:16, Ulf Hansson пишет:
...
quoted
quoted
Also note that a very similar problem exists, *before* the device gets
attached in the first place. More precisely, nothing prevents the
performance state from being set to a non-compatible value for an
always-on HW/device that hasn't been attached yet. So maybe you need
to set the maximum performance state at genpd initializations, then
use the ->sync_state() callback to very that all consumers have been
attached to the genpd provider, before allowing the state to be
changed/lowered?
That is already done by the PD driver.

https://elixir.bootlin.com/linux/latest/source/drivers/soc/tegra/pmc.c#L3790
Yes, I already knew that, but forgot it. :-) Thanks for the pointer.
Let me rethink the approach.

In a way, it kind of sounds like this is a generic problem - so
perhaps we should think of adding a ->withdraw_sync_state() callback
that can be assigned by provider drivers, to get informed when a
consumer driver is getting unbinded.
Not sure, doesn't feel to me that this is necessary for today. A bit too
cumbersome for a simple sanity-check, IMO.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help