All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org,
	Dennis <dennis.nezic@utoronto.ca>
Subject: [PATCH 1/3] drm/i915: Restore vblank interrupts earlier
Date: Mon,  1 Oct 2018 17:29:07 +0300	[thread overview]
Message-ID: <20181001142909.5567-1-ville.syrjala@linux.intel.com> (raw)

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Plane sanitation needs vblank interrupts (on account of CxSR disable).
So let's restore vblank interrupts earlier.

v2: Make it actually build

Cc: stable@vger.kernel.org
Cc: Dennis <dennis.nezic@utoronto.ca>
Tested-by: Dennis <dennis.nezic@utoronto.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105637
Fixes: b1e01595a66d ("drm/i915: Redo plane sanitation during readout")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4c5c2b39e65c..e018b37bed39 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15551,13 +15551,9 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
 			   I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK);
 	}
 
-	/* restore vblank interrupts to correct state */
-	drm_crtc_vblank_reset(&crtc->base);
 	if (crtc->active) {
 		struct intel_plane *plane;
 
-		drm_crtc_vblank_on(&crtc->base);
-
 		/* Disable everything but the primary plane */
 		for_each_intel_plane_on_crtc(dev, crtc, plane) {
 			const struct intel_plane_state *plane_state =
@@ -15899,7 +15895,6 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
 			     struct drm_modeset_acquire_ctx *ctx)
 {
 	struct drm_i915_private *dev_priv = to_i915(dev);
-	enum pipe pipe;
 	struct intel_crtc *crtc;
 	struct intel_encoder *encoder;
 	int i;
@@ -15912,15 +15907,19 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
 	/* HW state is read out, now we need to sanitize this mess. */
 	get_encoder_power_domains(dev_priv);
 
-	intel_sanitize_plane_mapping(dev_priv);
+	for_each_intel_crtc(&dev_priv->drm, crtc) {
+		drm_crtc_vblank_reset(&crtc->base);
 
-	for_each_intel_encoder(dev, encoder) {
-		intel_sanitize_encoder(encoder);
+		if (crtc->active)
+			drm_crtc_vblank_on(&crtc->base);
 	}
 
-	for_each_pipe(dev_priv, pipe) {
-		crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+	intel_sanitize_plane_mapping(dev_priv);
 
+	for_each_intel_encoder(dev, encoder)
+		intel_sanitize_encoder(encoder);
+
+	for_each_intel_crtc(&dev_priv->drm, crtc) {
 		intel_sanitize_crtc(crtc, ctx);
 		intel_dump_pipe_config(crtc, crtc->config,
 				       "[setup_hw_state]");
-- 
2.16.4

             reply	other threads:[~2018-10-01 21:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 14:29 Ville Syrjala [this message]
2018-10-01 14:31 ` [PATCH 2/3] drm/i915: Use the correct crtc when sanitizing plane mapping Ville Syrjala
2018-10-02 12:11   ` [Intel-gfx] " Daniel Vetter
2018-10-02 12:11     ` Daniel Vetter
2018-10-02 14:21     ` Ville Syrjälä
2018-10-02 14:21       ` Ville Syrjälä
2018-10-03  8:53       ` [Intel-gfx] " Daniel Vetter
2018-10-03  8:53         ` Daniel Vetter
2018-10-03 14:32         ` Ville Syrjälä
2018-10-03 14:32           ` Ville Syrjälä
2018-10-03 14:50   ` [PATCH v2 " Ville Syrjala
2018-10-03 14:50     ` Ville Syrjala
2018-10-03 16:12     ` Daniel Vetter
2018-10-03 16:12       ` Daniel Vetter
2018-10-04 17:24       ` Ville Syrjälä
2018-10-04 17:24         ` Ville Syrjälä
2018-10-01 14:31 ` [PATCH 3/3] drm/i915: Clean up early plane debugs Ville Syrjala
2018-10-02 12:21   ` Daniel Vetter
2018-10-02 14:42     ` [Intel-gfx] " Ville Syrjälä
2018-10-03 14:50   ` [PATCH v2 " Ville Syrjala
2018-10-03 16:12     ` [Intel-gfx] " Daniel Vetter
2018-10-01 15:19 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Restore vblank interrupts earlier Patchwork
2018-10-01 15:43 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-01 16:56 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-02  8:48 ` [PATCH 1/3] " Daniel Vetter
2018-10-02  8:48   ` Daniel Vetter
2018-10-03 14:49 ` [PATCH v2 " Ville Syrjala
2018-10-03 15:54 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/3] drm/i915: Restore vblank interrupts earlier (rev4) Patchwork
2018-10-03 16:25 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-04  7:34 ` ✓ 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=20181001142909.5567-1-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dennis.nezic@utoronto.ca \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.