intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: "Kristian H . Kristensen" <hoegsberg@chromium.org>,
	Sean Paul <seanpaul@google.com>
Subject: [PATCH] drm/i915: Wait for vblank between disabling planes and disabling crtc
Date: Mon, 13 Aug 2018 15:45:17 +0200	[thread overview]
Message-ID: <20180813134517.8486-1-maarten.lankhorst@linux.intel.com> (raw)

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@linux.intel.com>
Cc: Sean Paul <seanpaul@google.com>
Cc: Kristian H. Kristensen <hoegsberg@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

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

             reply	other threads:[~2018-08-13 13:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13 13:45 Maarten Lankhorst [this message]
2018-08-13 13:57 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Wait for vblank between disabling planes and disabling crtc Patchwork
2018-08-13 14:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-13 16:20 ` ✓ Fi.CI.IGT: " Patchwork

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=20180813134517.8486-1-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=hoegsberg@chromium.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=seanpaul@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).