diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-08-05 05:36:10 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-05 13:37:02 -0400 |
commit | 34b58355ad1d9987267f071265a7de6c8e00662a (patch) | |
tree | 78e0290c870a47bab12c7f702bc603e40087a931 /drivers/gpu/drm/amd/amdgpu | |
parent | a5a5e3084ec457f234298392dfa2c55db47b603f (diff) |
drm/ttm: Wait for a BO to become idle before unbinding it from GTT
Fixes hangs under memory pressure, e.g. running the piglit test
tex3d-maxsize concurrently with other tests.
Fixes: 17d33bc9d6ef ("drm/ttm: drop waiting for idle in ttm_bo_evict.")
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index b7742e62972a..9b61c8ba7aaf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |||
@@ -335,7 +335,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo, | |||
335 | if (unlikely(r)) { | 335 | if (unlikely(r)) { |
336 | goto out_cleanup; | 336 | goto out_cleanup; |
337 | } | 337 | } |
338 | r = ttm_bo_move_ttm(bo, true, no_wait_gpu, new_mem); | 338 | r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem); |
339 | out_cleanup: | 339 | out_cleanup: |
340 | ttm_bo_mem_put(bo, &tmp_mem); | 340 | ttm_bo_mem_put(bo, &tmp_mem); |
341 | return r; | 341 | return r; |
@@ -368,7 +368,7 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo, | |||
368 | if (unlikely(r)) { | 368 | if (unlikely(r)) { |
369 | return r; | 369 | return r; |
370 | } | 370 | } |
371 | r = ttm_bo_move_ttm(bo, true, no_wait_gpu, &tmp_mem); | 371 | r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem); |
372 | if (unlikely(r)) { | 372 | if (unlikely(r)) { |
373 | goto out_cleanup; | 373 | goto out_cleanup; |
374 | } | 374 | } |