[PATCH] drm/i915: get/put runtime PM at i915_semaphore_status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>

Otherwise we will print some WARNs when we read registers and the
machine is suspended.

Testcase: igt/pm_rpm/debugfs-read
Cc: Ben Widawsky <ben@xxxxxxxxxxxx>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 2 ++
 1 file changed, 2 insertions(+)

I still dream with the day we will have a system that will run IGT on our
patches/series _before_ they are applied to the tree, and tell us in case some
testcase fails or gives us a WARN.

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 0c665df..1ff56ec 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2316,6 +2316,7 @@ static int i915_semaphore_status(struct seq_file *m, void *unused)
 	ret = mutex_lock_interruptible(&dev->struct_mutex);
 	if (ret)
 		return ret;
+	intel_runtime_pm_get(dev_priv);
 
 	if (IS_BROADWELL(dev)) {
 		struct page *page;
@@ -2365,6 +2366,7 @@ static int i915_semaphore_status(struct seq_file *m, void *unused)
 	}
 	seq_putc(m, '\n');
 
+	intel_runtime_pm_put(dev_priv);
 	mutex_unlock(&dev->struct_mutex);
 	return 0;
 }
-- 
2.0.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux