[Intel-gfx] [PATCH v2 3/5] drm/i915: Drop the excessive vblank waits from modeset codepaths

Rodrigo Vivi rodrigo.vivi at gmail.com
Wed May 21 02:42:05 CEST 2014


Reviewed-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>


On Fri, Apr 25, 2014 at 3:30 AM, <ville.syrjala at linux.intel.com> wrote:

> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> 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 at linux.intel.com>
> ---
>  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
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140520/244a12ca/attachment.html>


More information about the Intel-gfx mailing list