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

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

 



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

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@xxxxxxxxxxxxxxx
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++++
 1 file changed, 4 insertions(+)

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;
-- 
2.0.1

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]