From: Daniel Vetter Date: Thu, 9 Aug 2012 13:07:01 +0000 (+0200) Subject: drm/i915: fixup up debugfs rps state handling X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~20^2~61^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=004777cb22a29e0a95dd1bfce6816a5a06db1e1d;p=pandora-kernel.git drm/i915: fixup up debugfs rps state handling - Take the dev->struct_mutex around access the corresponding state (and adjusting the rps hw state). - Add an assert to gen6_set_rps to ensure we don't forget about this in the future. - Don't set up the min/max_freq files if it doesn't apply to the hw. And do the same for the gen6+ cache sharing file while at it. v2: Move the gen6+ checks into the read/write callbacks. Thanks to the awesome drm midlayer we can't check that when registering the debugfs files, because the driver is not yet fully set up, specifically the ->load callback hasn't run yet. Oh how I despise this disaster ... v3: Also add a WARN_ON(mutex_is_locked) in set_rps to check the locking. v4: Use mutex_lock_interruptible, suggested by Chris Wilson. Reviewed-by: Ben Widawsky (for v2) Reviewed-by: Damien Lespiau Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed