diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-04-25 06:30:12 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-05-21 03:55:52 -0400 |
commit | 6304cd91e7f05f8802ea6f91287cac09741d9c46 (patch) | |
tree | 2b3227564d6cb8f817883554039cda68eba8f3e6 /drivers/gpu/drm/i915/intel_display.c | |
parent | cea165c34502052cb2aafc7e6bb36fe2036a19df (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bcfe0a8692dd..92e43ce8b607 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2108,7 +2108,6 @@ static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv, | |||
2108 | 2108 | ||
2109 | I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE); | 2109 | I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE); |
2110 | intel_flush_primary_plane(dev_priv, plane); | 2110 | intel_flush_primary_plane(dev_priv, plane); |
2111 | intel_wait_for_vblank(dev_priv->dev, pipe); | ||
2112 | } | 2111 | } |
2113 | 2112 | ||
2114 | /** | 2113 | /** |
@@ -2138,7 +2137,6 @@ static void intel_disable_primary_hw_plane(struct drm_i915_private *dev_priv, | |||
2138 | 2137 | ||
2139 | I915_WRITE(reg, val & ~DISPLAY_PLANE_ENABLE); | 2138 | I915_WRITE(reg, val & ~DISPLAY_PLANE_ENABLE); |
2140 | intel_flush_primary_plane(dev_priv, plane); | 2139 | intel_flush_primary_plane(dev_priv, plane); |
2141 | intel_wait_for_vblank(dev_priv->dev, pipe); | ||
2142 | } | 2140 | } |
2143 | 2141 | ||
2144 | static bool need_vtd_wa(struct drm_device *dev) | 2142 | static bool need_vtd_wa(struct drm_device *dev) |
@@ -4002,15 +4000,6 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) | |||
4002 | 4000 | ||
4003 | intel_crtc_enable_planes(crtc); | 4001 | intel_crtc_enable_planes(crtc); |
4004 | 4002 | ||
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); | ||
4014 | } | 4003 | } |
4015 | 4004 | ||
4016 | /* IPS only exists on ULT machines and is tied to pipe A. */ | 4005 | /* 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) | |||
4741 | for_each_encoder_on_crtc(dev, crtc, encoder) | 4730 | for_each_encoder_on_crtc(dev, crtc, encoder) |
4742 | encoder->disable(encoder); | 4731 | encoder->disable(encoder); |
4743 | 4732 | ||
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 | |||
4744 | intel_set_cpu_fifo_underrun_reporting(dev, pipe, false); | 4740 | intel_set_cpu_fifo_underrun_reporting(dev, pipe, false); |
4745 | intel_disable_pipe(dev_priv, pipe); | 4741 | intel_disable_pipe(dev_priv, pipe); |
4746 | 4742 | ||