>From 67d4836e3511db2691c4ff2d3a23bf8c0e950edb Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 24 Jan 2012 22:55:26 -0500 Subject: [PATCH] drm/nouveau: fix move notify callback On vram buffer eviction the ttm_bo_move_accel_cleanup will the mm_node field of struct ttm_mem_reg of new_mem placement to NULL. As move notify call back is now call after ttm_bo_move_accel_cleanup it was using NULL ptr for mm_node. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 724b41a..3a9d978 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -814,13 +814,13 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) list_for_each_entry(vma, &nvbo->vma_list, head) { if (new_mem && new_mem->mem_type == TTM_PL_VRAM) { - nouveau_vm_map(vma, new_mem->mm_node); + nouveau_vm_map(vma, bo->mem.mm_node); } else if (new_mem && new_mem->mem_type == TTM_PL_TT && nvbo->page_shift == vma->vm->spg_shift) { nouveau_vm_map_sg(vma, 0, new_mem-> num_pages << PAGE_SHIFT, - new_mem->mm_node); + bo->mem.mm_node); } else { nouveau_vm_unmap(vma); } -- 1.7.7.6