All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Restore vblank interrupts earlier
@ 2018-10-01 14:29 Ville Syrjala
  2018-10-01 14:31 ` [PATCH 2/3] drm/i915: Use the correct crtc when sanitizing plane mapping Ville Syrjala
                   ` (9 more replies)
  0 siblings, 10 replies; 30+ messages in thread
From: Ville Syrjala @ 2018-10-01 14:29 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, stable, Dennis

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

^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2018-10-05  0:19 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 14:29 [PATCH 1/3] drm/i915: Restore vblank interrupts earlier Ville Syrjala
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

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.