radeonsi: fix max syncobj wait timeout

syncobj wait takes int64_t timeout and won't clamp it
in kernel code, so we have to pass in INT64_MAX instead
of OS_TIMEOUT_INFINITE which is UINT64_MAX. Otherwise
syncobj wait with OS_TIMEOUT_INFINITE case just return
fail.

Fixes: c638301b42 "radeonsi: fix syncobj wait timeout"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6676>
This commit is contained in:
Qiang Yu
2020-09-10 10:08:41 +08:00
committed by Marge Bot
parent 3182209673
commit ef980ac0c1

View File

@@ -198,6 +198,9 @@ bool amdgpu_fence_wait(struct pipe_fence_handle *fence, uint64_t timeout,
/* Handle syncobjs. */
if (amdgpu_fence_is_syncobj(afence)) {
if (abs_timeout == OS_TIMEOUT_INFINITE)
abs_timeout = INT64_MAX;
if (amdgpu_cs_syncobj_wait(afence->ws->dev, &afence->syncobj, 1,
abs_timeout, 0, NULL))
return false;