diff mbox

[3/6] drm/i915: Get runtime pm ref on i915_fbc_fc_set

Message ID 1450113268-12183-3-git-send-email-mika.kuoppala@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kuoppala Dec. 14, 2015, 5:14 p.m. UTC
Setting the fbc does hardware access so it needs to have
pm ref.

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

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index d0e9f2d..0e568de 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1678,6 +1678,7 @@  static int i915_fbc_fc_set(void *data, u64 val)
 		return -ENODEV;
 
 	mutex_lock(&dev_priv->fbc.lock);
+	intel_runtime_pm_get(dev_priv);
 
 	reg = I915_READ(ILK_DPFC_CONTROL);
 	dev_priv->fbc.false_color = val;
@@ -1686,7 +1687,9 @@  static int i915_fbc_fc_set(void *data, u64 val)
 		   (reg | FBC_CTL_FALSE_COLOR) :
 		   (reg & ~FBC_CTL_FALSE_COLOR));
 
+	intel_runtime_pm_put(dev_priv);
 	mutex_unlock(&dev_priv->fbc.lock);
+
 	return 0;
 }