Module: Mesa Branch: master Commit: c638301b42bc6ea1a623c2a53646047197fb8030 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c638301b42bc6ea1a623c2a53646047197fb8030
Author: Qiang Yu <[email protected]> Date: Thu Sep 3 17:39:41 2020 +0800 radeonsi: fix syncobj wait timeout syncobj wait takes absolute timeout value. Fixes: 162502370c7 "winsys/amdgpu: implement sync_file import/export" Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6579> --- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 7f097c50cfc..f51c7782033 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -191,26 +191,21 @@ bool amdgpu_fence_wait(struct pipe_fence_handle *fence, uint64_t timeout, if (afence->signalled) return true; + if (absolute) + abs_timeout = timeout; + else + abs_timeout = os_time_get_absolute_timeout(timeout); + /* Handle syncobjs. */ if (amdgpu_fence_is_syncobj(afence)) { - /* Absolute timeouts are only be used by BO fences, which aren't - * backed by syncobjs. - */ - assert(!absolute); - if (amdgpu_cs_syncobj_wait(afence->ws->dev, &afence->syncobj, 1, - timeout, 0, NULL)) + abs_timeout, 0, NULL)) return false; afence->signalled = true; return true; } - if (absolute) - abs_timeout = timeout; - else - abs_timeout = os_time_get_absolute_timeout(timeout); - /* The fence might not have a number assigned if its IB is being * submitted in the other thread right now. Wait until the submission * is done. */ _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
