drm/ttm: add wait for idle in all drivers bo_move functions

Wait for idle before moving the BO in all drivers implementing
an accelerated move function.

This should keep the current behavior when removing the pre move wait.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Christian König
2016-06-06 10:17:53 +02:00
committed by Alex Deucher
parent 1888577807
commit 88932a7be2
5 changed files with 25 additions and 0 deletions

View File

@@ -403,6 +403,10 @@ static int radeon_bo_move(struct ttm_buffer_object *bo,
struct ttm_mem_reg *old_mem = &bo->mem;
int r;
r = ttm_bo_wait(bo, interruptible, no_wait_gpu);
if (r)
return r;
/* Can't move a pinned BO */
rbo = container_of(bo, struct radeon_bo, tbo);
if (WARN_ON_ONCE(rbo->pin_count > 0))