From b9ef29d1be7bfb2fd6b59023792208e5028b95f0 Mon Sep 17 00:00:00 2001 From: Jack Xiao Date: Thu, 4 Jun 2015 10:41:24 +0800 Subject: [PATCH] amdgpu: add zero timeout check in amdgpu_cs_query_fence_status Signed-off-by: Jack Xiao Reviewed-by: Jammy Zhou --- amdgpu/amdgpu_cs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index a1e68f85..0fa05ece 100644 --- a/amdgpu/amdgpu_cs.c +++ b/amdgpu/amdgpu_cs.c @@ -396,6 +396,11 @@ int amdgpu_cs_query_fence_status(struct amdgpu_cs_query_fence *fence, return 0; } + if (fence->timeout_ns == 0) { + pthread_mutex_unlock(&context->sequence_mutex); + return 0; + } + pthread_mutex_unlock(&context->sequence_mutex); r = amdgpu_ioctl_wait_cs(context, ip_type, ip_instance, ring,