From 88932a7be27d892aef21ff05428a55fefa091716 Mon Sep 17 00:00:00 2001 From: Christian König Date: Mon, 6 Jun 2016 10:17:53 +0200 Subject: 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 Signed-off-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/qxl/qxl_ttm.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/gpu/drm/qxl') diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 0738d74c8d04..89e8be944330 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -350,6 +350,13 @@ static int qxl_bo_move(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) { struct ttm_mem_reg *old_mem = &bo->mem; + int ret; + + ret = ttm_bo_wait(bo, interruptible, no_wait_gpu); + if (ret) + return ret; + + if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { qxl_move_null(bo, new_mem); return 0; -- cgit v1.2.3-55-g7522