projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9119708
)
drm/i915: fix locking around punit access in cur_delayinfo for VLV
author
Jesse Barnes
<jbarnes@virtuousgeek.org>
Mon, 22 Apr 2013 22:59:30 +0000
(15:59 -0700)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Tue, 23 Apr 2013 09:13:27 +0000
(11:13 +0200)
We need to hold the rps lock around punit access.
Reported-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_debugfs.c
b/drivers/gpu/drm/i915/i915_debugfs.c
index 367b534d2260dc41c90e31e29d9e2daf089e331b..d195d097cbb758779a9171a9fb0ae7bdf6d8e483 100644
(file)
--- a/
drivers/gpu/drm/i915/i915_debugfs.c
+++ b/
drivers/gpu/drm/i915/i915_debugfs.c
@@
-1012,6
+1012,7
@@
static int i915_cur_delayinfo(struct seq_file *m, void *unused)
} else if (IS_VALLEYVIEW(dev)) {
u32 freq_sts, val;
+ mutex_lock(&dev_priv->rps.hw_lock);
valleyview_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS,
&freq_sts);
seq_printf(m, "PUNIT_REG_GPU_FREQ_STS: 0x%08x\n", freq_sts);
@@
-1028,6
+1029,7
@@
static int i915_cur_delayinfo(struct seq_file *m, void *unused)
seq_printf(m, "current GPU freq: %d MHz\n",
vlv_gpu_freq(dev_priv->mem_freq,
(freq_sts >> 8) & 0xff));
+ mutex_unlock(&dev_priv->rps.hw_lock);
} else {
seq_printf(m, "no P-state info available\n");
}