summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Xiao <Jack.Xiao@amd.com>2015-06-04 10:41:24 +0800
committerJammy Zhou <Jammy.Zhou@amd.com>2015-06-05 18:21:24 +0800
commit74bce88e1c3e79933386e9b43c4126f3596dc537 (patch)
treebf048e968b657c45932e7f9a7668c9df00e3138f
parentc0777af131c4a7c6d3d1d9de6205d2cdcf58f719 (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 5e406e8b..44e132cc 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -900,6 +900,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,