diff mbox series

drm/i915: Fix corruption lines on the screen on Gen9 chromebooks

Message ID 1567586770-6898-1-git-send-email-gaurav.k.singh@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix corruption lines on the screen on Gen9 chromebooks | expand

Commit Message

Gaurav K Singh Sept. 4, 2019, 8:46 a.m. UTC
On Gen9 chromebooks, we are seeing the screen shows several
large blue horizontal stripes over the top. Also, corruption happens
when we switch from a chrome browser tab to VT2 mode(by pressing Ctrl+Alt+F2)
and then back to chrome tab.

As per the display workaround #1200, FBC needs wait for vblank
before enabling and before disabling FBC.

Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 16ed44bfd734..dd224b82bf02 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -1097,6 +1097,8 @@  void intel_fbc_enable(struct intel_crtc *crtc,
 		if (fbc->crtc == crtc) {
 			WARN_ON(!crtc_state->enable_fbc);
 			WARN_ON(fbc->active);
+			if (IS_GEN(dev_priv, 9))
+				intel_wait_for_vblank(dev_priv, crtc->pipe);
 		}
 		goto out;
 	}
@@ -1137,8 +1139,11 @@  void intel_fbc_disable(struct intel_crtc *crtc)
 		return;
 
 	mutex_lock(&fbc->lock);
-	if (fbc->crtc == crtc)
+	if (fbc->crtc == crtc) {
 		__intel_fbc_disable(dev_priv);
+		if (IS_GEN(dev_priv, 9))
+			intel_wait_for_vblank(dev_priv, crtc->pipe);
+	}
 	mutex_unlock(&fbc->lock);
 }