[Nouveau] [RFC] Initial power management vbios parsing, voltage & clock setting to nouveau.
martin.peres at free.fr
Wed Sep 15 02:57:22 PDT 2010
I've been messing with PM management for a few days and I've accumulated
an interesting volume of code.
I am now interested in comments on the overall architecture. For
example, in this patch, I implement a proposition on how to split
nouveau_bios.c I would really like you to comment. I have also
introduced nouveau_pm.[hc] along with vbios/vbios_pm.[ch].
Another thing I would be interested in is the vbios parsing testing.
At the moment, it should work from nv40 to at least nv96 but it has
really been tested only on an nv86 and an nv96. I'm expecting a lot of
Power mode setting is _not recommended for anything other than dev
There is still work to be done:
- Clock & voltage: It needs testing.
- Memory timings: It is being REed by RSpliet (please help him, he
should be able to provide directions).
- Fan control: I have no information on this.
Despite these lacks, you should be able to safely try to downclock your
card though. That's good news for laptop users, isn't it?
Please acknowledge that this work is almost entirely based on others's
RE work and documentation work. Xexaxo's work has been impressive.
RSpliet is also to be thanked as he is working on getting memory timing
support. Darktama has also done some nice RE, we'll see how to merge his
work. My work here has just been to implement the docs.
On a side note, I would like to say I will be out for 5 days to the XDS
So, if you have questions I should discuss with some devs there, feel
free to ask.
Martin Peres (aka mupuf), an happy new nouveau dev
---- How to help for the vbios parsing ?----
Thanks for wanting to help :)
First, grab the patch I've joined to this mail. It should cleanly apply
on nouveau's master branch.
Compile, Install & Reboot.
$ cat /sys/class/drm/card0/device/pm_status
and compare the values to
# nvclock -i
If it differs, please follow the instructions here:
If it works, then, you may want to try changing the clocks.
---- How to test clock/voltage setting ?----
Do not attempt anything if the vbios parsing is wrong, really.
If it did work as intended, you can continue.
** Warning ** Do not try to upclock your card, nothing good will happen.
While playing with clocks, always check the
First, kill X (for safety reasons).
Then look for the wanted mode by doing:
$ cat /sys/class/drm/card0/device/pm_mode
It should give you a result like:
--- PM Modes ---
0: core 169 MHz/shader 338 MHz/memory 100 MHz/1150 mV
*1: core 275 MHz/shader 550 MHz/memory 301 MHz/1150 mV
2: core 400 MHz/shader 800 MHz/memory 600 MHz/1200 mV
The * means it is the currently used mode (it may also not be detected).
In this example, you should only stay between mode 0 and 1.
To set the wanted PM mode, please do so:
# echo 0 > /sys/class/drm/card0/device/pm_mode
The command above will change the mode to the first mode.
There is another file for voltage control at
/sys/class/drm/card0/device/pm_voltage that works the exact same way as
The other sysfs entries (temperature related) should be useless to you
as they are just here for future work).
You're done, have fun.
More information about the Nouveau