Reviewed-by: Rodrigo Vivi <[email protected]>
On Fri, Apr 25, 2014 at 3:30 AM, <[email protected]> wrote: > From: Ville Syrjälä <[email protected]> > > 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ä <[email protected]> > --- > drivers/gpu/drm/i915/intel_display.c | 19 +++++++------------ > 1 file changed, 7 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c > b/drivers/gpu/drm/i915/intel_display.c > index 33d21bf..17258fe5 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -1901,7 +1901,6 @@ static void intel_enable_primary_hw_plane(struct > drm_i915_private *dev_priv, > > I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE); > intel_flush_primary_plane(dev_priv, plane); > - intel_wait_for_vblank(dev_priv->dev, pipe); > } > > /** > @@ -1931,7 +1930,6 @@ static void intel_disable_primary_hw_plane(struct > drm_i915_private *dev_priv, > > I915_WRITE(reg, val & ~DISPLAY_PLANE_ENABLE); > intel_flush_primary_plane(dev_priv, plane); > - intel_wait_for_vblank(dev_priv->dev, pipe); > } > > static bool need_vtd_wa(struct drm_device *dev) > @@ -3706,16 +3704,6 @@ static void ironlake_crtc_enable(struct drm_crtc > *crtc) > if (HAS_PCH_CPT(dev)) > cpt_verify_modeset(dev, intel_crtc->pipe); > > - /* > - * There seems to be a race in PCH platform hw (at least on some > - * outputs) where an enabled pipe still completes any pageflip > right > - * away (as if the pipe is off) instead of waiting for vblank. As > soon > - * as the first vblank happend, everything works as expected. > Hence just > - * wait for one vblank before returning to avoid strange things > - * happening. > - */ > - intel_wait_for_vblank(dev, intel_crtc->pipe); > - > drm_vblank_on(dev, pipe); > } > > @@ -4475,6 +4463,13 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc) > intel_disable_planes(crtc); > intel_disable_primary_hw_plane(dev_priv, plane, pipe); > > + /* > + * On gen2 planes are double buffered but the pipe isn't, so we > must > + * wait for planes to fully turn off before disabling the pipe. > + */ > + if (IS_GEN2(dev)) > + intel_wait_for_vblank(dev, pipe); > + > intel_set_cpu_fifo_underrun_reporting(dev, pipe, false); > intel_disable_pipe(dev_priv, pipe); > > -- > 1.8.3.2 > > _______________________________________________ > Intel-gfx mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > -- Rodrigo Vivi Blog: http://blog.vivi.eng.br
_______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
