diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_mem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 5ee14d216ce8..f55b51be1bf1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c | |||
@@ -794,7 +794,7 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, | |||
794 | int ret; | 794 | int ret; |
795 | 795 | ||
796 | if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) | 796 | if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) |
797 | size_nc = 1 << nvbo->vma.node->type; | 797 | size_nc = 1 << nvbo->page_shift; |
798 | 798 | ||
799 | ret = vram->get(dev, mem->num_pages << PAGE_SHIFT, | 799 | ret = vram->get(dev, mem->num_pages << PAGE_SHIFT, |
800 | mem->page_alignment << PAGE_SHIFT, size_nc, | 800 | mem->page_alignment << PAGE_SHIFT, size_nc, |
@@ -804,9 +804,7 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, | |||
804 | return (ret == -ENOSPC) ? 0 : ret; | 804 | return (ret == -ENOSPC) ? 0 : ret; |
805 | } | 805 | } |
806 | 806 | ||
807 | node->page_shift = 12; | 807 | node->page_shift = nvbo->page_shift; |
808 | if (nvbo->vma.node) | ||
809 | node->page_shift = nvbo->vma.node->type; | ||
810 | 808 | ||
811 | mem->mm_node = node; | 809 | mem->mm_node = node; |
812 | mem->start = node->offset >> PAGE_SHIFT; | 810 | mem->start = node->offset >> PAGE_SHIFT; |