[Intel-gfx] [PATCH 43/49] drm/i915/bdw: Handle context switch events

Mateo Lozano, Oscar oscar.mateo at intel.com
Mon Apr 28 16:43:34 CEST 2014


> > >   		tmp = I915_READ(GEN8_GT_IIR(0));
> > >   		if (tmp) {
> > >   			ret = IRQ_HANDLED;
> > > +
> > >   			rcs = tmp >> GEN8_RCS_IRQ_SHIFT;
> > > -			bcs = tmp >> GEN8_BCS_IRQ_SHIFT;
> > > +			ring = &dev_priv->ring[RCS];
> > >   			if (rcs & GT_RENDER_USER_INTERRUPT)
> > > -				notify_ring(dev, &dev_priv->ring[RCS]);
> > > +				notify_ring(dev, ring);
> > > +			if (rcs & GEN8_GT_CONTEXT_SWITCH_INTERRUPT)
> > > +				gen8_handle_context_events(ring);
> > 
> > Handling the context events here can generate a new execlist submission,
> > which if a small enough workload, can finish and generate a new context event
> > interrupt before we ack this interrupt.
> > 
> > When we ack this interrupt, we clear the new one too, loosing an interrupt.
> > 
> > Moving the
> > 
> > I915_WRITE(GEN8_GT_IIR(0), tmp);
> > 
> > to just inside the if (tmp) { conditional (or anywhere before this call) fixes this
> > issue. There is no harm in acking the interrupt immediately as we have the
> > read stored in tmp.
> > 
> -----Original Message-----
> From: Daniel, Thomas
> Sent: Monday, April 28, 2014 10:58 AM
> To: Beckett, Robert; Mateo Lozano, Oscar; Barbalho, Rafael; Ewins, Jon
> Subject: RE: Re: [Intel-gfx] [PATCH 43/49] drm/i915/bdw: Handle context switch
> events
> 
> Hi Bob,
> 
> Looks like a good catch, and a sensible fix.
> 
> Thomas.

I agree with Thomas. Will add to the next revision of the series.

Thanks!
Oscar



More information about the Intel-gfx mailing list