[PATCH] drm/i915: add missing forcewake put on i915_wa_registers()

Paulo Zanoni
2014-10-21T16:58:55Z

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Otherwise, a simple "cat" to the debugfs file can make the machine use
much more power than needed, and prevent it from runtime suspending.

Related commit:

commit 8452e1d173a16d9812422a2272c4ab0f0ba81057
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date: Tue Oct 7 17:21:26 2014 +0300
drm/i915: Build workaround list in ring initialization

Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
Testcase: igt/pm_rpm/debugfs-read
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 9600285..36a4baa 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2671,6 +2671,7 @@ static int i915_wa_registers(struct seq_file *m, void *unused)
addr, value, mask, read, ok ? "OK" : "FAIL");
}

+ gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL);
intel_runtime_pm_put(dev_priv);
mutex_unlock(&dev->struct_mutex);

--
2.1.1