projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90b9b13
)
freedreno/drm: Short-circuit kernel for timeout=0 waits
author
Rob Clark
<robdclark@chromium.org>
Thu, 15 Dec 2022 19:14:58 +0000
(11:14 -0800)
committer
Marge Bot
<emma+marge@anholt.net>
Sat, 17 Dec 2022 19:14:12 +0000
(19:14 +0000)
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>
src/freedreno/drm/freedreno_pipe.c
patch
|
blob
|
history
diff --git
a/src/freedreno/drm/freedreno_pipe.c
b/src/freedreno/drm/freedreno_pipe.c
index
b81b290
..
75b16d8
100644
(file)
--- a/
src/freedreno/drm/freedreno_pipe.c
+++ b/
src/freedreno/drm/freedreno_pipe.c
@@
-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);