[Intel-gfx] [PATCH 2/5] drm/i915/gt: Restore ce->signal flush before releasing virtual engine

Andi Shyti andi at etezian.org
Fri Jan 8 15:54:28 UTC 2021


> > > +void intel_context_remove_breadcrumbs(struct intel_context *ce,
> > > +                                   struct intel_breadcrumbs *b)
> > > +{
> > > +     struct i915_request *rq, *rn;
> > > +     bool release = false;
> > > +     unsigned long flags;
> > > +
> > > +     spin_lock_irqsave(&ce->signal_lock, flags);
> > > +
> > > +     if (list_empty(&ce->signals))
> > > +             goto unlock;
> > 
> > does "list_empty" need to be under lock or you've been lazy?
> 
> This check is required to be under the lock, we have to be careful about
> not calling remove_signaling_context() from here and signal_irq_work.
> I put the unlocked check in the caller to avoid the function call as well.

OK...

Reviewed-by: Andi Shyti <andi.shyti at intel.com>

Andi


More information about the Intel-gfx mailing list