diff mbox

[3/3] drm/i915: get runtime PM when pinning primary plane objects

Message ID 1406572636-1809-6-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni July 28, 2014, 6:37 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Otherwise we may get WARNs saying we're writing registers while
runtime suspended.

Testcase: igt/pm_rpm/universal-planes
Testcase: igt/pm_rpm/universal-planes-dpms
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f1a9b5c..5948207 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11531,7 +11531,9 @@  intel_primary_plane_setplane(struct drm_plane *plane, struct drm_crtc *crtc,
 				  INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe));
 
 		/* Pin and return without programming hardware */
+		intel_runtime_pm_get(dev_priv);
 		ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
+		intel_runtime_pm_put(dev_priv);
 		mutex_unlock(&dev->struct_mutex);
 
 		return ret;
@@ -11553,7 +11555,9 @@  intel_primary_plane_setplane(struct drm_plane *plane, struct drm_crtc *crtc,
 		 * fail.
 		 */
 		if (plane->fb != fb) {
+			intel_runtime_pm_get(dev_priv);
 			ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
+			intel_runtime_pm_put(dev_priv);
 			if (ret) {
 				mutex_unlock(&dev->struct_mutex);
 				return ret;