[Intel-gfx] [RFC 5/7] drm/i915: Add flip_done_handler definition

B S, Karthik karthik.b.s at intel.com
Tue Mar 10 12:52:48 UTC 2020


> -----Original Message-----
> From: Zanoni, Paulo R <paulo.r.zanoni at intel.com>
> Sent: Tuesday, March 10, 2020 4:49 AM
> To: B S, Karthik <karthik.b.s at intel.com>; intel-gfx at lists.freedesktop.org
> Cc: ville.syrjala at linux.intel.com; Kulkarni, Vandita
> <vandita.kulkarni at intel.com>; Shankar, Uma <uma.shankar at intel.com>
> Subject: Re: [RFC 5/7] drm/i915: Add flip_done_handler definition
> 
> Em sex, 2020-03-06 às 17:09 +0530, Karthik B S escreveu:
> > Send the flip done event in the handler and disable the interrupt.
> >
> > Signed-off-by: Karthik B S <karthik.b.s at intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_irq.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c
> > b/drivers/gpu/drm/i915/i915_irq.c index 5955e737a45d..1feda9aecf4a
> > 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -1243,6 +1243,24 @@ display_pipe_crc_irq_handler(struct
> drm_i915_private *dev_priv,
> >  			     u32 crc4) {}
> >  #endif
> >
> > +static void flip_done_handler(struct drm_i915_private *dev_priv,
> > +			      unsigned int pipe)
> 
> The compiler is going to complain that we added a static function with no
> caller.
> 
> See my comment on commit 1: please squash this patch with the one that
> makes use of the new function.

Sure. Will restructure the patches as per your feedback. Thanks.
> 
> > +{
> > +	struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
> > +	struct drm_crtc_state *crtc_state = crtc->base.state;
> > +	struct drm_device *dev = &dev_priv->drm;
> > +	unsigned long irqflags;
> > +
> > +	spin_lock_irqsave(&dev->event_lock, irqflags);
> > +
> > +	if (crtc_state->event->base.event->type ==
> DRM_EVENT_FLIP_COMPLETE) {
> > +		drm_crtc_send_vblank_event(&crtc->base, crtc_state-
> >event);
> > +		crtc_state->event = NULL;
> > +	}
> > +
> > +	spin_unlock_irqrestore(&dev->event_lock, irqflags);
> > +	icl_disable_flip_done(&crtc->base);
> > +}
> >
> >  static void hsw_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
> >  				     enum pipe pipe)



More information about the Intel-gfx mailing list