On Thu, Mar 5, 2020 at 7:06 AM Christian KÃnig <christian.koenig@xxxxxxx> wrote:
[SNIP]I'm not 100% convinced it has to. We already have support for the
Well as far as I can see this won't work because it would break the
semantics of the timeline sync.
seqno regressing and we ensure that we still wait for all the fences.
I thought maybe we could use that but I haven't spent enough time
looking at the details to be sure. I may be missing something.
I can prototype that if you want, shouldn't be more than a few hours ofIf you'd like to, go for it. I'd be happy to give it a go as well but
hacking anyway.
if you already know what you want, it may be easier for you to just
write the patch for the cursor.
Two more questions:
1. Do you want this collapsing to happen every time we create a
dma_fence_array or should it be a special entrypoint? Collapsing all
the time likely means doing extra array calculations instead of the
dma_fence_array taking ownership of the array that's passed in. My
gut says that cost is ok; but my gut doesn't spend much time in kernel
space.
2. When we do the collapsing, should we call dma_fence_is_signaled()
to avoid adding signaled fences to the array? It seems like avoiding
adding references to fences that are already signaled would let the
kernel clean them up faster and reduce the likelihood that a fence
will hang around forever because it keeps getting added to arrays with
other unsignaled fences.
--Jason