[Intel-gfx] [PATCH] drm/i915: Wait for vblank between disabling planes and disabling crtc

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Aug 13 13:45:17 UTC 2018


Disabling cursor does not take effect until the next vblank, but if the
pipe is shut down too quickly after a cursor disable, we will see
random corruption from where the mouse cursor used to be when the pipe
is enabled again.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106478
References: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/877396/
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Sean Paul <seanpaul at google.com>
Cc: Kristian H. Kristensen <hoegsberg at chromium.org>
---
 drivers/gpu/drm/i915/intel_display.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a2aed7e3ed0d..a02c77a3bc7e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12673,6 +12673,9 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 			 */
 			intel_crtc_disable_pipe_crc(intel_crtc);
 
+			/* Wait a vblank for planes to actually be turned off */
+			intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
+
 			dev_priv->display.crtc_disable(to_intel_crtc_state(old_crtc_state), state);
 			intel_crtc->active = false;
 			intel_fbc_disable(intel_crtc);
-- 
2.18.0



More information about the Intel-gfx mailing list