On Sun, 25 Mar 2012 14:15:56 +0200 Daniel Vetter <daniel at ffwll.ch> wrote: > On Sat, Mar 24, 2012 at 07:09:46PM -0700, Ben Widawsky wrote: > > Merge rc6 information into the power group for our device. Until > > now the i915 driver has not had any sysfs entries (aside from the > > connector stuff enabled by libdrm). Since it seems like we're > > likely to have more in the future I created a new file for sysfs > > stubs, as well as the rc6 sysfs functions which don't really belong > > elsewhere (perhaps i915_suspend, but most of the stuff is in > > intel_display,c). > > > > displays #ms GPU has been in rc6 since boot: > > cat /sys/class/drm/card0/power/rc6 > > > > displays #ms GPU has been in deep rc6 since boot: > > cat /sys/class/drm/card0/power/rc6p > > > > displays #ms GPU has been in deepest rc6 since boot: > > cat /sys/class/drm/card0/power/rc6pp > > > > Important note: I've seen on SNB that even when RC6 is *not* > > enabled the rc6 register seems to have a random value in it. I > > cannot explain a reason for this. Those writing tools that utilize > > this value need to be careful and probably want to scrutinize the > > value very carefully. > > > > Please see intel-gpu-tools patches for sample code. > > > > CC: Arjan van de Ven <arjan at linux.intel.com> > > Signed-off-by: Ben Widawsky <ben at bwidawsk.net> > > I like this (with the cleanups you've mentioned). While you dig > around in sysfs, can I volunteer you to add another patch to create > an official interface for i915_max_freq? Maybe call it > max_gpu_freq_MHz (if MHz is an acceptable unit for sysfs files). We > have a bug report which might get partially happy with this (there > seem to be other issues): > > https://bugzilla.kernel.org/show_bug.cgi?id=41392a > > Cheers, Daniel > Yes. From looking at cpureq, it seems MHz is not standard. Simply writing the frequency as a number in the [m|b]illions is the way to go. I'll get on this once I get an ack from you that you pick up the later versions of my sysfs stuff.