drm/ttm: Wait for a BO to become idle before unbinding it from GTT
authorMichel Dänzer <michel.daenzer@amd.com>
Fri, 5 Aug 2016 09:36:10 +0000 (18:36 +0900)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Aug 2016 17:37:02 +0000 (13:37 -0400)
commit34b58355ad1d9987267f071265a7de6c8e00662a
tree78e0290c870a47bab12c7f702bc603e40087a931
parenta5a5e3084ec457f234298392dfa2c55db47b603f
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/radeon/radeon_ttm.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_util.c
include/drm/ttm/ttm_bo_driver.h