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;
}
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);
}
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 *
unsigned domain)
{
if (domain == NOUVEAU_BO_VRAM) {
- buf->mm = nouveau_mm_allocate(screen->mm_VRAM, buf->base.width0, &buf->bo,
- &buf->offset);
+ buf->mm = nouveau_mm_allocate(screen->base.mm_VRAM, buf->base.width0,
+ &buf->bo, &buf->offset);
if (!buf->bo)
return nv50_buffer_allocate(screen, buf, NOUVEAU_BO_GART);
} else
if (domain == NOUVEAU_BO_GART) {
- buf->mm = nouveau_mm_allocate(screen->mm_GART, buf->base.width0, &buf->bo,
- &buf->offset);
+ buf->mm = nouveau_mm_allocate(screen->base.mm_GART, buf->base.width0,
+ &buf->bo, &buf->offset);
if (!buf->bo)
return FALSE;
}
assert(buf->domain == NOUVEAU_BO_VRAM);
- mm = nouveau_mm_allocate(nv50->screen->mm_GART, size, &bounce, &offset);
+ mm = nouveau_mm_allocate(nv50->screen->base.mm_GART, size, &bounce, &offset);
if (!bounce)
return FALSE;
return TRUE;
}
- mm = nouveau_mm_allocate(nv50->screen->mm_GART, size, &bounce, &offset);
+ mm = nouveau_mm_allocate(nv50->screen->base.mm_GART, size, &bounce, &offset);
if (!bounce)
return FALSE;
}
}
if (size) {
- q->mm = nouveau_mm_allocate(screen->mm_GART, size, &q->bo, &q->base);
+ q->mm = nouveau_mm_allocate(screen->base.mm_GART, size, &q->bo, &q->base);
if (!q->bo)
return FALSE;
q->offset = q->base;
if (screen->tic.entries)
FREE(screen->tic.entries);
- nouveau_mm_destroy(screen->mm_GART);
- nouveau_mm_destroy(screen->mm_VRAM);
nouveau_mm_destroy(screen->mm_VRAM_fe0);
nouveau_grobj_free(&screen->tesla);
screen->tic.entries = CALLOC(4096, sizeof(void *));
screen->tsc.entries = screen->tic.entries + 2048;
- 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);
screen->mm_VRAM_fe0 = nouveau_mm_create(dev, NOUVEAU_BO_VRAM, 0xfe0);
nouveau_fence_new(&screen->base, &screen->base.fence.current, FALSE);
struct nouveau_notifier *sync;
- struct nouveau_mman *mm_GART;
- struct nouveau_mman *mm_VRAM;
struct nouveau_mman *mm_VRAM_fe0;
struct nouveau_grobj *tesla;