drm/nouveau: do not map evicted vram buffers in nouveau_bo_vma_add
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 12 Nov 2013 12:34:12 +0000 (13:34 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 14 Nov 2013 04:57:09 +0000 (14:57 +1000)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bo.c

index 129aceed407deec24d55634a03b76933bbf18910..c0fde6b9393cb24fa602e838fdf145657d059d05 100644 (file)
@@ -1545,7 +1545,8 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm,
 
        if (nvbo->bo.mem.mem_type == TTM_PL_VRAM)
                nouveau_vm_map(vma, nvbo->bo.mem.mm_node);
-       else if (nvbo->bo.mem.mem_type == TTM_PL_TT) {
+       else if (nvbo->bo.mem.mem_type == TTM_PL_TT &&
+                nvbo->page_shift == vma->vm->vmm->spg_shift) {
                if (node->sg)
                        nouveau_vm_map_sg_table(vma, 0, size, node);
                else