Martin Peres
2010-Sep-15 09:57 UTC
[Nouveau] [RFC] Initial power management vbios parsing, voltage & clock setting to nouveau.
Hi folks, 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 bug report. Power mode setting is _not recommended for anything other than dev testing_. 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 2010. So, if you have questions I should discuss with some devs there, feel free to ask. Best regards, 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: http://nouveau.freedesktop.org/wiki/PowerManagementDumps 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 current temperature 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 pm_mode. The other sysfs entries (temperature related) should be useless to you as they are just here for future work). You're done, have fun.
"C. Bergström"
2010-Sep-15 12:33 UTC
[Nouveau] [RFC] Initial power management vbios parsing, voltage & clock setting to nouveau.
Martin Peres wrote:> Hi folks, > > I've been messing with PM management for a few days and I've > accumulated an interesting volume of code.If you're an end users also feel free to pull the branch directly.. http://github.com/pathscale/pscnv/tree/pm-wip We're in #pathscale if you need more help or hit bugs.. thanks ./C ps (Have a great trip Martin and good luck at the conference!)
Robert Kaiser
2010-Sep-15 12:58 UTC
[Nouveau] [RFC] Initial power management vbios parsing, voltage & clock setting to nouveau.
Martin Peres schrieb:> I've been messing with PM management for a few days and I've accumulated > an interesting volume of code.On an only slightly related note, what's the recommended way to read out the temperature of the GPU when using nouveau? (I have a NV4B card, but I think I read this is mostly the same for all NVidias, right?) Robert Kaiser