[PATCH] radeon: Make PM info available to all, not just debug users

Martin Peres martin.peres at free.fr
Mon Jun 4 10:01:12 PDT 2012


Le 04/06/2012 17:18, Jerome Glisse a écrit :
>
> My experience is that things that are true today for GPU, are not
> tomorrow. Yes there will still be clock/voltage, but there could be
> new complete different things, like shutting down block.
IMO, this isn't something the user should ever be aware of.
NVIDIA GPUs have been clock gated for years and we can
also cut the power to some parts of the card.
> I am not even mentioning things like complex value range dependency
> btw things (for instance if a domain as clock/voltage in certain range
> than some other domain can only have clock in a restricted range
> value).
Yeah, the power budget could get in our way. However, if no perflvl
is defined in the vbios and we can't calculate a given preset, then
we are in the completly dynamic scenario I talked about earlier. It still
fits the proposed interface because the user is only setting a performance
profile, not a performance level. That's the difference.

Moreover, we can't ask the user for anything too complex anyway...
>
> While i agree that sysfs looks easy for user to play with, i believe
> that gui is what you really after and afaik closed source driver all
> expose a gui for their power management. Using ioctl allow better
> overall control, like atomic setting of several domain ...
Want to do power management from the userspace? :o

If you need that much control, you're doing something wrong. The kernel
should be in charge of power management. The interface I'm talking
about is just a way to report clocks to the user *and* to get some
input from the user of what he really wants to achieve.

In the case where a user would want to set clocks + voltage himself,
the sysfs interface I proposed works perfectly and atomically:

- The user sets both the voltage and clock domains of the custom
performance level.
- Then the user is free to switch to the custom performance profile.
- Here is your atomicity ;)

While I agree that future GPUs will get more and more complex,
I still think we need something that is broad-enough to accomodate
for future architectures and precise-enough to give users good power.

I would really like to get an interface like that in the foreseeable future,
there is no rush but we still need to find a way and I would like the DRM
community to think about this issue.

Martin


More information about the dri-devel mailing list