[Intel-gfx] [RFC 6/9] drm/syncobj: Mark syncobj waits as external waiters

Rob Clark robdclark at gmail.com
Mon Feb 20 15:31:45 UTC 2023


On Mon, Feb 20, 2023 at 5:19 AM Tvrtko Ursulin
<tvrtko.ursulin at linux.intel.com> wrote:
>
>
> On 18/02/2023 19:56, Rob Clark wrote:
> > On Thu, Feb 16, 2023 at 2:59 AM Tvrtko Ursulin
> > <tvrtko.ursulin at linux.intel.com> wrote:
> >>
> >> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> >>
> >> Use the previously added dma-fence tracking of explicit waiters.
> >>
> >> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> >> ---
> >>   drivers/gpu/drm/drm_syncobj.c | 6 +++---
> >>   1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
> >> index 0c2be8360525..776b90774a64 100644
> >> --- a/drivers/gpu/drm/drm_syncobj.c
> >> +++ b/drivers/gpu/drm/drm_syncobj.c
> >> @@ -1065,9 +1065,9 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
> >>                          if ((flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE) ||
> >>                              dma_fence_is_signaled(fence) ||
> >>                              (!entries[i].fence_cb.func &&
> >> -                            dma_fence_add_callback(fence,
> >> -                                                   &entries[i].fence_cb,
> >> -                                                   syncobj_wait_fence_func))) {
> >> +                            dma_fence_add_wait_callback(fence,
> >> +                                                        &entries[i].fence_cb,
> >> +                                                        syncobj_wait_fence_func))) {
> >
> > I think this isn't really what you want if count > 1, because you
> > wouldn't be notifying the fence signaler of fence n+1 until the wait
> > on fence n completed
>
> Are you sure? After some staring all I can see is that all callbacks are
> added before the first sleep.

Ahh, yes, you are right

BR,
-R


More information about the dri-devel mailing list