[Mesa-dev] [PATCH 3/3] gk20a: use NOUVEAU_BO_GART as VRAM domain
Alexandre Courbot
acourbot at nvidia.com
Mon Oct 27 03:34:59 PDT 2014
GK20A does not have dedicated VRAM, therefore allocating in VRAM can be
sub-optimal and sometimes even harmful. Set its VRAM domain to
NOUVEAU_BO_GART so all objects are allocated in system memory.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index ac5823e4a8d5..ad143cd9a140 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -620,6 +620,16 @@ nvc0_screen_create(struct nouveau_device *dev)
return NULL;
pscreen = &screen->base.base;
+ /* Recognize chipsets with no VRAM */
+ switch (dev->chipset) {
+ /* GK20A */
+ case 0xea:
+ screen->base.vram_domain = NOUVEAU_BO_GART;
+ break;
+ default:
+ break;
+ }
+
ret = nouveau_screen_init(&screen->base, dev);
if (ret) {
nvc0_screen_destroy(pscreen);
--
2.1.2
More information about the mesa-dev
mailing list