[PATCH 4/7] drm/xe/oa: Signal output fences

Dixit, Ashutosh ashutosh.dixit at intel.com
Fri Aug 30 22:58:59 UTC 2024


On Fri, 30 Aug 2024 15:45:17 -0700, Matthew Brost wrote:
>
> On Fri, Aug 30, 2024 at 03:16:15PM -0700, Ashutosh Dixit wrote:
> > Introduce 'struct xe_oa_fence' which includes the dma_fence used to signal
> > output fences in the xe_sync array. The fences are signaled
> > asynchronously. When there are no output fences to signal, the OA
> > configuration wait is synchronously re-introduced into the ioctl.
> >
> > v2: Don't wait in the work, use callback + delayed work (Matt B)
> >     Use a single, not a per-fence spinlock (Matt Brost)
> > v3: Move ofence alloc before job submission (Matt)
> >     Assert, don't fail, from dma_fence_add_callback (Matt)
> >     Additional dma_fence_get for dma_fence_wait (Matt)
> >     Change dma_fence_wait to non-interruptible (Matt)
> > v4: Introduce last_fence to prevent uaf if stream is closed with
> >     pending OA config jobs
>
> The usage looks correct, so RB holds.
>
> One suggestion which can be done in a follow up. I had to check the
> locking to make this this was correct (i.e. a mutex at the outer
> layer was held to make this serial) and didn't notice any lockdep
> annotations in your code. Lockdep is good catching problems but also
> self documenting which helps to review / maintain code. If possible
> maybe sprilke in lockdep annotation in the OA code.

Thanks Matt, yep, will try to figure out and do this as follow up.

Thanks.
--
Ashutosh


More information about the Intel-xe mailing list