[Intel-gfx] [PATCH 2/2] drm/i915: Kill intel_crtc->vbl_wait

Daniel Vetter daniel at ffwll.ch
Thu May 22 22:21:33 CEST 2014


On Thu, May 22, 2014 at 08:30:23PM +0100, Chris Wilson wrote:
> On Thu, May 22, 2014 at 06:05:34PM +0200, Daniel Vetter wrote:
> > On Thu, May 22, 2014 at 04:49:03PM +0100, Chris Wilson wrote:
> > > On Thu, May 22, 2014 at 06:39:33PM +0300, ville.syrjala at linux.intel.com wrote:
> > > > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > > > 
> > > > Share the waitqueue that drm_irq uses when performing the vblank evade
> > > > trick for atomic pipe updates.
> > > > 
> > > > Suggested-by: Daniel Vetter <daniel at ffwll.ch>
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/i915_irq.c      | 25 ++++++-------------------
> > > >  drivers/gpu/drm/i915/intel_display.c |  2 --
> > > >  drivers/gpu/drm/i915/intel_drv.h     |  2 --
> > > >  drivers/gpu/drm/i915/intel_sprite.c  |  5 +++--
> > > >  4 files changed, 9 insertions(+), 25 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > > > index 304f86a..5905a9d 100644
> > > > --- a/drivers/gpu/drm/i915/i915_irq.c
> > > > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > > > @@ -1724,19 +1724,6 @@ static void gen6_rps_irq_handler(struct drm_i915_private *dev_priv, u32 pm_iir)
> > > >  	}
> > > >  }
> > > >  
> > > > -static bool intel_pipe_handle_vblank(struct drm_device *dev, enum pipe pipe)
> > > > -{
> > > > -	struct intel_crtc *crtc;
> > > > -
> > > > -	if (!drm_handle_vblank(dev, pipe))
> > > > -		return false;
> > > > -
> > > > -	crtc = to_intel_crtc(intel_get_crtc_for_pipe(dev, pipe));
> > > > -	wake_up(&crtc->vbl_wait);
> > > > -
> > > > -	return true;
> > > > -}
> > > 
> > > Can we keep this bare wrapper? It is quite useful for hooking in vblank
> > > checks - i.e. saves me having to reinrtoduce it.
> > 
> > Just smash them into drm_handle_vblank?
> 
> The ones I have in mind the pageflip stall checks and gpu-boost for
> missed pageflips, i.e. driver specific.

Hm yeah, the pageflip stall check should be in the vblank handler. And
yeah boosting harder in the vblank handler if an outstanding pageflip
hasn't been completed yet also makes sense. I'll augment Ville's patch v2
with these reasons and merge that one.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list