summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Xiao <Jack.Xiao@amd.com>2015-06-04 07:18:27 +0300
committerAlex Deucher <alexander.deucher@amd.com>2015-06-05 17:59:25 +0300
commit25f45e633892a45df2edbfd4a5dbbfc70e32487b (patch)
treed93288a893d969ee1263146598ca331b2cfadf8e
parentae45577324d1f749c907840247d443696ac3bc7a (diff)
downloadlinux-25f45e633892a45df2edbfd4a5dbbfc70e32487b.tar.xz
drm/amdgpu: add zero timeout check in amdgpu_fence_wait_seq_timeout
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 9ce6023a4261..48ca637c5029 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -522,6 +522,10 @@ long amdgpu_fence_wait_seq_timeout(struct amdgpu_device *adev, u64 *target_seq,
bool signaled;
int i, r;
+ if (timeout == 0) {
+ return amdgpu_fence_any_seq_signaled(adev, target_seq);
+ }
+
while (!amdgpu_fence_any_seq_signaled(adev, target_seq)) {
/* Save current sequence values, used to check for GPU lockups */