aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2019-06-26 02:32:43 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-06-27 11:19:36 -0500
commitf6319596535f157ce95504b193e0bfc3da7119e6 (patch)
tree6867f99a9921823bae3b36a58a658b8ac1e84510 /drivers/gpu
parentdrm/amdgpu: drop copy/paste leftover to fix big endian (diff)
downloadlinux-dev-f6319596535f157ce95504b193e0bfc3da7119e6.tar.xz
linux-dev-f6319596535f157ce95504b193e0bfc3da7119e6.zip
drm/ttm: return -EBUSY if waiting for busy BO fails
Returning -EAGAIN prevents ttm_bo_mem_space from trying alternate placements and can lead to live-locks in amdgpu_cs, retrying indefinitely and never succeeding. Fixes: d367bd2a5e2b12 ("drm/ttm: fix busy memory to fail other user v10") Signed-off-by: Felix Kuehling <Felix.Kuehling@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/ttm/ttm_bo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 6953dd264172..a7fd5a4955c9 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -827,7 +827,7 @@ static int ttm_mem_evict_wait_busy(struct ttm_buffer_object *busy_bo,
if (!r)
reservation_object_unlock(busy_bo->resv);
- return r == -EDEADLK ? -EAGAIN : r;
+ return r == -EDEADLK ? -EBUSY : r;
}
static int ttm_mem_evict_first(struct ttm_bo_device *bdev,