summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Xiao <Jack.Xiao@amd.com>2015-06-04 10:41:24 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-07-30 00:11:11 -0400
commit06b6173e8d3c054ea75fd2b529759972852050f5 (patch)
tree49c4cbac41c569628fef7d77bc6164d20692cdd6
parent197d7b6fdb9b66c2c41f6b4eedf4ea3168a59dc8 (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,