The real question is what you want to be controlling. The two factors 
that we can actually influence are voltage and frequency - and on some 
cards we're limited to frequency. Everything else is then constrained by 
that choice. So the only thing that it makes sense to expose to 
userspace here is the frequency. As others have suggested, policy is 
probably best described in terms of either performance (fixed maximum 
frequency) or powersave (ondemand frequency shifting).

That's not to say that there aren't other constraints people may want to 
impose, but they're orthogonal. A user may want to stop their GPU from 
running at more than a certain temperature. That can be achieved by 
leaving this interface as is, but hooking it into the kernel thermal 
zone code. The user can then set a temperature limit and the kernel will 
automatically slow the chip down whenever it gets near that temperature. 
Since this is effectively a proxy for fan speed, that also gets catered 
for.

So I think a general policy knob (like scaling_cur_governor in cpufreq) 
ought to be sufficient here, possibly along with an indication of the 
instantaneous frequency because some people seem to like that kind of 
thing. Anything else sounds like overengineering.

-- 
Matthew Garrett | mj...@srcf.ucam.org

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to