aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2018-04-30 10:04:42 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-05-15 14:44:18 -0400
commit719a39a1e9b2dfbfb86f17a8da696b714a3b885d (patch)
tree7742227f6aeb7f65ef7c6946c768c710528fd849 /drivers/gpu
parent00862edba135c30d65b9af863163fdfa1f502c61 (diff)
drm/amdgpu: Switch to interruptable wait to recover from ring hang.
v2: Use dma_fence_wait instead of dma_fence_wait_timeout(...,MAX_SCHEDULE_TIMEOUT) Avoid printing error message for ERESTARTSYS Originally-by: David Panariti <David.Panariti@amd.com> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index eb80edfb1b0a..6741a62a7d15 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -421,9 +421,11 @@ int amdgpu_ctx_wait_prev_fence(struct amdgpu_ctx *ctx, unsigned ring_id)
421 421
422 if (other) { 422 if (other) {
423 signed long r; 423 signed long r;
424 r = dma_fence_wait_timeout(other, false, MAX_SCHEDULE_TIMEOUT); 424 r = dma_fence_wait(other, true);
425 if (r < 0) { 425 if (r < 0) {
426 DRM_ERROR("Error (%ld) waiting for fence!\n", r); 426 if (r != -ERESTARTSYS)
427 DRM_ERROR("Error (%ld) waiting for fence!\n", r);
428
427 return r; 429 return r;
428 } 430 }
429 } 431 }