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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Andi Shyti (2021-01-08 15:18:22)
> Hi Chris,
> 
> > +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.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux