From 2f30a5bdaad480118e23ac4243de3b4a11ba62a8 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 1 Mar 2011 10:27:45 +1000 Subject: nv50: make mm available as common code Signed-off-by: Ben Skeggs --- src/gallium/drivers/nv50/nv50_screen.h | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'src/gallium/drivers/nv50/nv50_screen.h') diff --git a/src/gallium/drivers/nv50/nv50_screen.h b/src/gallium/drivers/nv50/nv50_screen.h index c2ec3b58dc2..672891b6b7f 100644 --- a/src/gallium/drivers/nv50/nv50_screen.h +++ b/src/gallium/drivers/nv50/nv50_screen.h @@ -4,6 +4,7 @@ #define NOUVEAU_NVC0 #include "nouveau/nouveau_screen.h" #include "nouveau/nouveau_fence.h" +#include "nouveau/nouveau_mm.h" #undef NOUVEAU_NVC0 #include "nv50_winsys.h" #include "nv50_stateobj.h" @@ -11,7 +12,6 @@ #define NV50_TIC_MAX_ENTRIES 2048 #define NV50_TSC_MAX_ENTRIES 2048 -struct nv50_mman; struct nv50_context; #define NV50_SCRATCH_SIZE (2 << 20) @@ -54,9 +54,9 @@ struct nv50_screen { struct nouveau_notifier *sync; - struct nv50_mman *mm_GART; - struct nv50_mman *mm_VRAM; - struct nv50_mman *mm_VRAM_fe0; + struct nouveau_mman *mm_GART; + struct nouveau_mman *mm_VRAM; + struct nouveau_mman *mm_VRAM_fe0; struct nouveau_grobj *tesla; struct nouveau_grobj *eng2d; @@ -69,27 +69,6 @@ nv50_screen(struct pipe_screen *screen) return (struct nv50_screen *)screen; } -/* Since a resource can be migrated, we need to decouple allocations from - * them. This struct is linked with fences for delayed freeing of allocs. - */ -struct nv50_mm_allocation { - struct nv50_mm_allocation *next; - void *priv; - uint32_t offset; -}; - -extern struct nv50_mman * -nv50_mm_create(struct nouveau_device *, uint32_t domain, uint32_t storage_type); - -extern void -nv50_mm_destroy(struct nv50_mman *); - -extern struct nv50_mm_allocation * -nv50_mm_allocate(struct nv50_mman *, - uint32_t size, struct nouveau_bo **, uint32_t *offset); -extern void -nv50_mm_free(struct nv50_mm_allocation *); - void nv50_screen_make_buffers_resident(struct nv50_screen *); int nv50_screen_tic_alloc(struct nv50_screen *, void *); -- cgit v1.2.3