diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2015-02-20 12:22:59 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-04-14 10:00:42 +0300 |
commit | eaecf0326f096faaba462eae48a3b30bcb1f7009 (patch) | |
tree | da4d31cc0d0a867786e2cca541d6a89a1541c921 /drivers/gpu/drm/nouveau/nouveau_ttm.c | |
parent | c6a7b026a3a80662d8f7bb6b4f7821329aa7111b (diff) | |
download | linux-eaecf0326f096faaba462eae48a3b30bcb1f7009.tar.xz |
make RAM device optional
Having a RAM device does not make sense for chips like GK20A which have
no dedicated video memory. The dummy RAM device that we used so far
works as a temporary band-aid, but in the longer term it is desirable
for the driver to be able to work without any kind of VRAM.
This patch adds a few conditionals in places where a RAM device was
assumed to be present and allows some more objects to be allocated from
the TT domain, allowing Nouveau to handle GPUs for which
pfb->ram == NULL.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_ttm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 273e50110ec3..18f449715788 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -82,6 +82,9 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, u32 size_nc = 0; int ret; + if (drm->device.info.ram_size == 0) + return -ENOMEM; + if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) size_nc = 1 << nvbo->page_shift; |