diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-11-12 00:13:59 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-07 22:48:16 -0500 |
commit | 5f6fdca570b13a8a2c9cab9ab6edfc17487049cf (patch) | |
tree | d188de3054be8e2d5d407c3851cf86c9adc967b1 /drivers/gpu/drm/nouveau/nouveau_mem.c | |
parent | bfd83aca5a1c4cc07fb18d96ed8660f2c338a8f3 (diff) |
drm/nv50: enable non-contig vram allocations where requested
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_mem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.c | 6 |
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, | |||
713 | struct drm_device *dev = dev_priv->dev; | 713 | struct drm_device *dev = dev_priv->dev; |
714 | struct nouveau_bo *nvbo = nouveau_bo(bo); | 714 | struct nouveau_bo *nvbo = nouveau_bo(bo); |
715 | struct nouveau_vram *vram; | 715 | struct nouveau_vram *vram; |
716 | u32 size_nc = 0; | ||
716 | int ret; | 717 | int ret; |
717 | 718 | ||
719 | if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) | ||
720 | size_nc = 1 << nvbo->vma.node->type; | ||
721 | |||
718 | ret = nv50_vram_new(dev, mem->num_pages << PAGE_SHIFT, | 722 | ret = nv50_vram_new(dev, mem->num_pages << PAGE_SHIFT, |
719 | mem->page_alignment << PAGE_SHIFT, 0, | 723 | mem->page_alignment << PAGE_SHIFT, size_nc, |
720 | (nvbo->tile_flags >> 8) & 0x7f, &vram); | 724 | (nvbo->tile_flags >> 8) & 0x7f, &vram); |
721 | if (ret) | 725 | if (ret) |
722 | return ret; | 726 | return ret; |