summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Xiao <Jack.Xiao@amd.com>2015-06-04 10:41:24 +0800
committerJack Xiao <Jack.Xiao@amd.com>2015-06-04 12:13:58 +0800
commit374fb3ff26287a833ec298960350be252d287acd (patch)
tree027a44ca74c37d20bd691ef40e8ea3bade6e0710
parentec0c7323eb86ed7a5b8fea53567eeccdc7e31c68 (diff)
amdgpu: add zero timeout check in amdgpu_cs_query_fence_status
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
-rw-r--r--amdgpu/amdgpu_cs.c5
1 files changed, 5 insertions, 0 deletions
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,