aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c4
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 7ac7bc3a8de3..b1b33a108b31 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -815,10 +815,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem)
815 struct nouveau_vma *vma; 815 struct nouveau_vma *vma;
816 816
817 list_for_each_entry(vma, &nvbo->vma_list, head) { 817 list_for_each_entry(vma, &nvbo->vma_list, head) {
818 if (new_mem->mem_type == TTM_PL_VRAM) { 818 if (new_mem && new_mem->mem_type == TTM_PL_VRAM) {
819 nouveau_vm_map(vma, new_mem->mm_node); 819 nouveau_vm_map(vma, new_mem->mm_node);
820 } else 820 } else
821 if (new_mem->mem_type == TTM_PL_TT && 821 if (new_mem && new_mem->mem_type == TTM_PL_TT &&
822 nvbo->page_shift == vma->vm->spg_shift) { 822 nvbo->page_shift == vma->vm->spg_shift) {
823 nouveau_vm_map_sg(vma, 0, new_mem-> 823 nouveau_vm_map_sg(vma, 0, new_mem->
824 num_pages << PAGE_SHIFT, 824 num_pages << PAGE_SHIFT,