mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
freedreno/drm: Short-circuit kernel for timeout=0 waits
We already know from the userspace fence whether the fence has signaled or not. No need to do a syscall if we aren't going to wait. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
This commit is contained in:
parent
90b9b1330d
commit
a9cdbed5a2
1 changed files with 3 additions and 0 deletions
|
|
@ -192,6 +192,9 @@ fd_pipe_wait_timeout(struct fd_pipe *pipe, const struct fd_fence *fence,
|
|||
if (!fd_fence_after(fence->ufence, pipe->control->fence))
|
||||
return 0;
|
||||
|
||||
if (!timeout)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
fd_pipe_flush(pipe, fence->ufence);
|
||||
|
||||
return pipe->funcs->wait(pipe, fence, timeout);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue