[Intel-gfx] [PATCH] drm/i915/debugfs: Missing intel_runtime_pm_*

David Weinehall david.weinehall at linux.intel.com
Thu Jun 2 08:02:29 UTC 2016


i915_sseu_status() was missing intel_runtime_pm_{get,put},
meaning that in some cases access to HW would be attempted
while the device is suspended.

Testcase: igt/pm_rpm/debugfs-read
Signed-off-by: David Weinehall <david.weinehall at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index e4f2c55d9697..694b0d394c7b 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -5290,11 +5290,14 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
 {
 	struct drm_info_node *node = (struct drm_info_node *) m->private;
 	struct drm_device *dev = node->minor->dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct sseu_dev_status stat;
 
 	if (INTEL_INFO(dev)->gen < 8)
 		return -ENODEV;
 
+	intel_runtime_pm_get(dev_priv);
+
 	seq_puts(m, "SSEU Device Info\n");
 	seq_printf(m, "  Available Slice Total: %u\n",
 		   INTEL_INFO(dev)->slice_total);
@@ -5333,6 +5336,8 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
 	seq_printf(m, "  Enabled EU Per Subslice: %u\n",
 		   stat.eu_per_subslice);
 
+	intel_runtime_pm_put(dev_priv);
+
 	return 0;
 }
 
-- 
2.8.1



More information about the Intel-gfx mailing list