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

Martin Peres martin.peres at free.fr
Mon Jun 4 13:31:08 PDT 2012


On 04.06.2012 20:29, Jerome Glisse wrote:
> On Mon, Jun 4, 2012 at 2:18 PM, Jerome Glisse<j.glisse at gmail.com>  wrote:
>>>
>>> Yeah, I get your point as a kernel dev, but I pitty the userspace dev that
>>> will need to figure out how to use all these ioctls and configuration
>>> options.
>> My point there is that we do the userspace bit, i would like to come
>> up with some kind of module that thing like gnome-control-center can
>> use or kde equivalent or anyother desktop environment.
A GUI will be needed, but I thought it would be much simpler to share
as much of the PM interface as possible.

If you hear about someone starting the project, I'll be glad to give some
input and contribute some code too for Nouveau.
>>
>>> What about having a simple common API (sysfs, preferably) that allow to
>>> change
>>> the performance profile and leave the rest to drivers?
>>>
>>> Would that be acceptable?
>>> Cheers,
>>> Martin
>> I think a powerprofile file is acceptable, i am not sure if it should
>> be discrete like performance/normal/battery/low or something more like
>> a scale 0-10 with 10 being full power and 0 being the lowest power the
>> GPU can do. I am more incline to the word solution for which we can
>> gave clear definition like :
>>
>> low : power mode is only able to meet the need of one light graphical
>> application (like video playback) expect some sluggishness in
>> rendering when switching between application.
>> battery: save as much power and reduce GPU speed while still allowing
>> fast desktop reactivity
>> ...
Just like you, my mind is mixed. However, I don't think
"performance/normal/battery/low" is a good way to put it.

I would go for something like that:
low (static, clocked to the lowest)
conservative (DVFS but slow to upclock, instant declock) : default for 
battery
normal (DVFS, instant upclock and declock)
performance (DVFS, instant upclock and slow declock) : default for sector
benchmark (static, clocked to the highest)

slow ~= 100ms, instant == less than a frame

The hardest part will be upclocking the GPU right to where it isn't a
bottleneck anymore.
>>
>> Cheers,
>> Jerome
> Maybe i should stress that i believe that driver can't efficiently do
> quick reclocking when it comes to GPU. My understanding is that newer
> GPU wether AMD or NVidia use some kind of controller that use a small
> firmware to control power adjustment base on GPU usage on the flight.
> Those firmware use driver input to determine range of operation
> (max/min voltage/frequency/fan speed/...) What i want to allow is for
> userspace to customize and know about those range of operations. A
> power profile is just a set of range (a range might be a single value
> on some less adjustable GPU) for each of the adjustable parameters.
Exactly my thoughts too :) PDAEMON is a 200MHz engine
that has full access to MMIO. We can get and generate IRQs
from/for the host. It can access performance counters
but it seems like it also has some performance counters of his own.

The only problem is that we have no good compiler for this ISA.
The ISA was reverse engineered by mwk, we have a good
assembler.
So I'm trying to keep things as simple as possible for maintainability :D

FYI: https://gitorious.org/pdaemon/pdaemon/blobs/master/pdaemon.fuc

Anyway, we are in the same mindset, so let's implement what we both of us
have in mind and see how we can share things when we are done with
our toy implementations, we can try to compare our solutions.
> Cheers,
> Jerome
Martin



More information about the dri-devel mailing list