Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kiran.s.kumar@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: FBC needs vblank before enable / disable
Date: Wed, 29 May 2019 11:28:07 +0530	[thread overview]
Message-ID: <1559109487-29542-1-git-send-email-kiran.s.kumar@intel.com> (raw)

From: Kiran Kumar S <kiran.s.kumar@intel.corp-partner.google.com>

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

In some cases, depending on whether FBC was compressing in that frame,
several control signals in the compression engine also will fail to
properly recognize the final segment of the frame as a result of the
missing last pixel indication. As a result of this, we're seeing corrupted
cache line/compression indicators after FBC re-enables which causes
underruns or corruption when they're used to decompress.

WA sequence as below:
1) Display enables plane 1A
2) Wait for 1 vblank
3) FBC gets enabled
4) Wait for 1 VBLANK
5) Turn off FBC

In GLK Chrome OS, if FBC is enabled by default, few top lines on the screen
got corrupted. With the above WA, issue was resolved.

v2: Added wait for vblank code in FBC as it will be called if and only if
fbc is enabled.

And also, as per the information from hardware team that the above
WA is for GLK.

Signed-off-by: Kiran Kumar S <kiran.s.kumar@intel.corp-partner.google.com>
---
 drivers/gpu/drm/i915/intel_fbc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 5679f2fffb7c..d4b8cfb8419e 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1094,6 +1094,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_GEMINILAKE(dev_priv))
+				intel_wait_for_vblank(dev_priv, crtc->pipe);
 		}
 		goto out;
 	}
@@ -1134,8 +1136,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_GEMINILAKE(dev_priv))
+			intel_wait_for_vblank(dev_priv, crtc->pipe);
+	}
 	mutex_unlock(&fbc->lock);
 }
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2019-05-29  6:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29  5:58 kiran.s.kumar [this message]
2019-05-29  7:37 ` ✗ Fi.CI.BAT: failure for drm/i915: FBC needs vblank before enable / disable Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-04-03  7:10 [PATCH] " kiran.s.kumar
2019-04-03  7:03 kiran.s.kumar
2019-04-03  6:17 kiran.s.kumar
2019-04-05 18:10 ` Ville Syrjälä
2019-04-03  4:50 kiran.s.kumar
2019-04-03  4:30 kiran.s.kumar
2019-04-03 17:54 ` Souza, Jose
2019-04-01 16:30 kiran.s.kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1559109487-29542-1-git-send-email-kiran.s.kumar@intel.com \
    --to=kiran.s.kumar@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox