提交 847b19a3 编写于 作者: J Jammy Zhou 提交者: Sumit Semwal

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: NJammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
Reviewed-By: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: NSumit Semwal <sumit.semwal@linaro.org>
上级 fb8b7d2b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册