summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-11-12 06:13:59 +0100
committerBen Skeggs <bskeggs@redhat.com>2010-12-08 04:48:16 +0100
commit5f6fdca570b13a8a2c9cab9ab6edfc17487049cf (patch)
treed188de3054be8e2d5d407c3851cf86c9adc967b1 /drivers/gpu/drm
parentdrm/nv50: enable 4KiB pages for small vram allocations (diff)
downloadlinux-5f6fdca570b13a8a2c9cab9ab6edfc17487049cf.tar.xz
linux-5f6fdca570b13a8a2c9cab9ab6edfc17487049cf.zip
drm/nv50: enable non-contig vram allocations where requested
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 3a531d53de4d..5a1809480388 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -713,10 +713,14 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man,
struct drm_device *dev = dev_priv->dev;
struct nouveau_bo *nvbo = nouveau_bo(bo);
struct nouveau_vram *vram;
+ u32 size_nc = 0;
int ret;
+ if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG)
+ size_nc = 1 << nvbo->vma.node->type;
+
ret = nv50_vram_new(dev, mem->num_pages << PAGE_SHIFT,
- mem->page_alignment << PAGE_SHIFT, 0,
+ mem->page_alignment << PAGE_SHIFT, size_nc,
(nvbo->tile_flags >> 8) & 0x7f, &vram);
if (ret)
return ret;