[Intel-gfx] [PATCH 4/6] drm/i915: Get runtime pm ref on i915_emon_status

Mika Kuoppala mika.kuoppala at linux.intel.com
Mon Dec 14 09:14:26 PST 2015


Getting emon status does access hw so it needs to have pm ref.

Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 0e568de..3e0e30d 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1771,9 +1771,13 @@ static int i915_emon_status(struct seq_file *m, void *unused)
 	if (ret)
 		return ret;
 
+	intel_runtime_pm_get(dev_priv);
+
 	temp = i915_mch_val(dev_priv);
 	chipset = i915_chipset_val(dev_priv);
 	gfx = i915_gfx_val(dev_priv);
+
+	intel_runtime_pm_put(dev_priv);
 	mutex_unlock(&dev->struct_mutex);
 
 	seq_printf(m, "GMCH temp: %ld\n", temp);
-- 
2.5.0



More information about the Intel-gfx mailing list