On Mon, 28 Dec 2020 at 03:30, Lina Iyer <ilina@xxxxxxxxxxxxxx> wrote: > > On Sat, Dec 26 2020 at 05:33 -0700, Ulf Hansson wrote: > >On Fri, 25 Dec 2020 at 02:31, Lina Iyer <ilina@xxxxxxxxxxxxxx> wrote: > >> > >> On Tue, Dec 22 2020 at 03:16 -0700, Ulf Hansson wrote: > >> >On Wed, 16 Dec 2020 at 18:51, Lina Iyer <ilina@xxxxxxxxxxxxxx> wrote: > >> >> > >> >> In order to debug critical domain and device power issues, it may be > >> >> necessary to disallow certain idle states at runtime. Let the device > >> >> disallow a domain idle state before suspending.The domain governor shall > >> >> check for the 'disabled' flag while determining the domain idle state. > >> > > >> >For debug purposes, you might as well just set a dev PM Qos latency > >> >request that corresponds to the state you want to disable. This will > >> >then prevent the genpd governor from selecting the state. > >> > > >> True, but it will also disable idle states deeper as well. Would like to > >> avoid that. > > > >I see. In any case, I am not so excited about adding an exported genpd > >interface for this that drivers can call, for example. > > > >Then I would rather see a proper debugfs interface, where userspace > >can both see the available states and choose which one to > >disable/enable. Would that work? > > > Sure, that would work. Any recommendations for existing debugfs node > that we can add this to or something new? I think there are two options: 1. A specific "enabled-states" node containing an array of values, one value for each available state. Like "on off on", if there are three states available, for example. 2. Convert into having a per idle state subnode/directory and then add a "enabled" node for each state. I guess the second option is more straightforward and easier for user space to deal with, but I have no strong opinions. Perhaps there is a third option as well? Kind regards Uffe