From 646fb15780f8f8bbfb89663c82eee56878c109a3 Mon Sep 17 00:00:00 2001 From: Marcin Slusarz Date: Mon, 28 Jun 2010 22:26:27 +0200 Subject: [PATCH] nouveau: don't oops in nouveau_bo_move's software fallback We can't fallback to software copy in nouveau_bo_move, because once nouveau_bo_move_m2mf fails, it sometimes break ttm_bo_move_memcpy assumption - when new_mem->mem_type == TTM_PL_VRAM, new_mem->mm_node should not be NULL. How? nouveau_bo_move_flipd and nouveau_bo_move_flips both call nouveau_bo_move_m2mf which calls nouveau_bo_move_accel_cleanup, which calls ttm_bo_move_accel_cleanup, which nullifies mm_node. But nouveau_bo_move_accel_cleanup after ttm_bo_move_accel_cleanup calls nouveau_fence_wait which can fail, so we are left with unfinished copy and broken new_mem. So don't fallback to software to avoid oopsing. Signed-off-by: Marcin Slusarz --- drivers/gpu/drm/nouveau/nouveau_bo.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 6f3c195..4d9c56c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -733,12 +733,6 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict, bool intr, else ret = nouveau_bo_move_m2mf(bo, evict, intr, no_wait_reserve, no_wait_gpu, new_mem); - if (!ret) - goto out; - - /* Fallback to software copy. */ - ret = ttm_bo_move_memcpy(bo, evict, no_wait_reserve, no_wait_gpu, new_mem); - out: if (ret) nouveau_bo_vm_cleanup(bo, NULL, &new_tile); -- 1.7.1