[Intel-gfx] [PATCH v2 09/24] drm/i915: Keep vblank interrupts enabled while enabling/disabling planes

Daniel Vetter daniel at ffwll.ch
Tue Apr 29 16:04:25 CEST 2014


On Mon, Apr 28, 2014 at 06:42:50PM -0300, Paulo Zanoni wrote:
> 2014-04-28 9:58 GMT-03:00  <ville.syrjala at linux.intel.com>:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > Becasue of the upcoming vblank interrupt driven watermark update
> 
> BecaUSe.
> 
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> 
> > mechanism we will have use for vblank interrupts during plane
> > enabling/disabling. So don't call drm_vblank_off() until planes
> > are off, and call drm_vblank_on() just before we start to enable
> > the planes.
> >
> > v2: Pimp commit message (Paulo)
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Argh, this depends upon the drm vblank rework in the core, which is still
hanging tight in a topic branch waiting for me to polish it. I'll move
that todo up on my priority list ...

Previous patches should be merged to dinq now (except the one I've noted).
-Daniel

> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 88df4ea..8d2a31e 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -3547,6 +3547,8 @@ static void ilk_crtc_enable_planes(struct drm_crtc *crtc)
> >         int pipe = intel_crtc->pipe;
> >         int plane = intel_crtc->plane;
> >
> > +       drm_vblank_on(dev, pipe);
> > +
> >         intel_enable_primary_plane(dev_priv, plane, pipe);
> >         intel_enable_planes(crtc);
> >         intel_crtc_update_cursor(crtc, true);
> > @@ -3557,8 +3559,6 @@ static void ilk_crtc_enable_planes(struct drm_crtc *crtc)
> >         mutex_lock(&dev->struct_mutex);
> >         intel_update_fbc(dev);
> >         mutex_unlock(&dev->struct_mutex);
> > -
> > -       drm_vblank_on(dev, pipe);
> >  }
> >
> >  static void ilk_crtc_disable_planes(struct drm_crtc *crtc)
> > @@ -3570,7 +3570,6 @@ static void ilk_crtc_disable_planes(struct drm_crtc *crtc)
> >         int plane = intel_crtc->plane;
> >
> >         intel_crtc_wait_for_pending_flips(crtc);
> > -       drm_vblank_off(dev, pipe);
> >
> >         if (dev_priv->fbc.plane == plane)
> >                 intel_disable_fbc(dev);
> > @@ -3581,6 +3580,8 @@ static void ilk_crtc_disable_planes(struct drm_crtc *crtc)
> >         intel_disable_planes(crtc);
> >         intel_disable_primary_plane(dev_priv, plane, pipe);
> >         intel_wait_for_vblank(dev, pipe);
> > +
> > +       drm_vblank_off(dev, pipe);
> >  }
> >
> >  static void ironlake_crtc_enable(struct drm_crtc *crtc)
> > --
> > 1.8.3.2
> >
> 
> 
> 
> -- 
> Paulo Zanoni
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list