Skip to content

Commit 6304cd9

Browse files
vsyrjaladanvet
authored andcommitted
drm/i915: Drop the excessive vblank waits from modeset codepaths
Now that we've plugged the mmio vs. ring flip race, we shouldn't need these vblank waits in the modeset codepaths anymore. So get rid of them. v2: gen2 needs to wait for planes to turn off before disabling pipe Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent cea165c commit 6304cd9

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,6 @@ static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv,
21082108

21092109
I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE);
21102110
intel_flush_primary_plane(dev_priv, plane);
2111-
intel_wait_for_vblank(dev_priv->dev, pipe);
21122111
}
21132112

21142113
/**
@@ -2138,7 +2137,6 @@ static void intel_disable_primary_hw_plane(struct drm_i915_private *dev_priv,
21382137

21392138
I915_WRITE(reg, val & ~DISPLAY_PLANE_ENABLE);
21402139
intel_flush_primary_plane(dev_priv, plane);
2141-
intel_wait_for_vblank(dev_priv->dev, pipe);
21422140
}
21432141

21442142
static bool need_vtd_wa(struct drm_device *dev)
@@ -4002,15 +4000,6 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
40024000

40034001
intel_crtc_enable_planes(crtc);
40044002

4005-
/*
4006-
* There seems to be a race in PCH platform hw (at least on some
4007-
* outputs) where an enabled pipe still completes any pageflip right
4008-
* away (as if the pipe is off) instead of waiting for vblank. As soon
4009-
* as the first vblank happend, everything works as expected. Hence just
4010-
* wait for one vblank before returning to avoid strange things
4011-
* happening.
4012-
*/
4013-
intel_wait_for_vblank(dev, intel_crtc->pipe);
40144003
}
40154004

40164005
/* IPS only exists on ULT machines and is tied to pipe A. */
@@ -4741,6 +4730,13 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
47414730
for_each_encoder_on_crtc(dev, crtc, encoder)
47424731
encoder->disable(encoder);
47434732

4733+
/*
4734+
* On gen2 planes are double buffered but the pipe isn't, so we must
4735+
* wait for planes to fully turn off before disabling the pipe.
4736+
*/
4737+
if (IS_GEN2(dev))
4738+
intel_wait_for_vblank(dev, pipe);
4739+
47444740
intel_set_cpu_fifo_underrun_reporting(dev, pipe, false);
47454741
intel_disable_pipe(dev_priv, pipe);
47464742

0 commit comments

Comments
 (0)