[PATCH 1/2] dma-buf: keep only not signaled fence in reservation_object_add_shared_replace v3

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 14 14:42:26 UTC 2017


Quoting Chris Wilson (2017-11-14 14:39:29)
> Quoting Christian König (2017-11-14 14:24:35)
> > The amdgpu issue to also need signaled fences in the reservation objects
> > should be fixed by now.
> > 
> > Optimize the list by keeping only the not signaled yet fences around.
> > 
> > v2: temporary put the signaled fences at the end of the new container
> > v3: put the old fence at the end of the new container as well.
> > 
> > Signed-off-by: Christian König <christian.koenig at amd.com>
> > ---
> > -       if (!old_fence) {
> > -               RCU_INIT_POINTER(fobj->shared[fobj->shared_count], fence);
> > -               fobj->shared_count++;
> > +               if (check->context == fence->context ||
> > +                   dma_fence_is_signaled(check))
> > +                       RCU_INIT_POINTER(fobj->shared[--k], check);
> > +               else
> > +                       RCU_INIT_POINTER(fobj->shared[j++], check);
> >         }
> > +       fobj->shared_count = j;
> > +       RCU_INIT_POINTER(fobj->shared[fobj->shared_count], fence);
> > +       fobj->shared_count++;
> 
> I would keep the INIT_PTR(fobj->shared[j++], fence);
> fobj->shared_count = j;
> 
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> I've been running an equivalent patch through our CI with nothing to
> report.

Make as well make that formal,
Tested-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the dri-devel mailing list