summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2011-03-01 10:49:36 +1000
committerBen Skeggs <[email protected]>2011-03-01 14:44:43 +1000
commitcd24fcedecfc41d77047fb827a88db528ed292ca (patch)
tree8607ff46820092ac871a5bb18cf2da056b588c67 /src/gallium/drivers/nouveau
parent3a38a4b0a8caae9be9a66f10e12ad41a1806037f (diff)
nouveau: create linear gart/vram mman in common screen init
Signed-off-by: Ben Skeggs <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c9
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index e14f2346a3e..e6cd3064c9a 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -251,6 +251,10 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
util_format_s3tc_init();
+ screen->mm_GART = nouveau_mm_create(dev,
+ NOUVEAU_BO_GART | NOUVEAU_BO_MAP,
+ 0x000);
+ screen->mm_VRAM = nouveau_mm_create(dev, NOUVEAU_BO_VRAM, 0x000);
return 0;
}
@@ -258,7 +262,12 @@ void
nouveau_screen_fini(struct nouveau_screen *screen)
{
struct pipe_winsys *ws = screen->base.winsys;
+
+ nouveau_mm_destroy(screen->mm_GART);
+ nouveau_mm_destroy(screen->mm_VRAM);
+
nouveau_channel_free(&screen->channel);
+
if (ws)
ws->destroy(ws);
}
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index e4a460ec657..173592d6ea7 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -24,6 +24,9 @@ struct nouveau_screen {
void (*emit)(struct pipe_screen *, u32 sequence);
u32 (*update)(struct pipe_screen *);
} fence;
+
+ struct nouveau_mman *mm_VRAM;
+ struct nouveau_mman *mm_GART;
};
static INLINE struct nouveau_screen *