freedreno/drm/virtio: Fix wait_fence ret ordering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

ret was read after the timeout check, so breaking on timeout returned 0
instead of the actual fence status, potentially reporting a signaled
fence when it was still pending.

Fixes: 441f01e778 ("freedreno/drm/virtio: Drop blocking in host")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41108>
This commit is contained in:
Valentine Burley 2026-04-22 13:39:18 +02:00 committed by Marge Bot
parent dad72b414b
commit 97baa27dad

View file

@ -138,11 +138,11 @@ virtio_pipe_wait(struct fd_pipe *pipe, const struct fd_fence *fence, uint64_t ti
if (ret)
goto out;
ret = rsp->ret;
if ((timeout != OS_TIMEOUT_INFINITE) &&
(os_time_get_nano() >= end_time))
break;
ret = rsp->ret;
} while (ret == -ETIMEDOUT);
out: