mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
dma-buf/fence: don't wait when specified timeout is zero
When specified timeout is zero for fence_wait_timeout, just check if the fence is signaled or not without wait. Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-By: Maarten Lankhorst <[email protected]> Signed-off-by: Sumit Semwal <[email protected]>
This commit is contained in:
parent
fb8b7d2b9d
commit
847b19a39e
1 changed files with 3 additions and 0 deletions
|
|
@ -159,6 +159,9 @@ fence_wait_timeout(struct fence *fence, bool intr, signed long timeout)
|
|||
if (WARN_ON(timeout < 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (timeout == 0)
|
||||
return fence_is_signaled(fence);
|
||||
|
||||
trace_fence_wait_start(fence);
|
||||
ret = fence->ops->wait(fence, intr, timeout);
|
||||
trace_fence_wait_end(fence);
|
||||
|
|
|
|||
Loading…
Reference in a new issue