diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-03-01 10:27:45 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-03-01 14:44:42 +1000 |
commit | 2f30a5bdaad480118e23ac4243de3b4a11ba62a8 (patch) | |
tree | 19bacb87c4bad3e5e4e6e5c846f16d62f5a9226d /src/gallium/drivers/nouveau/nouveau_mm.h | |
parent | 7a8ee058a83f1eda2c783d83fc5967fd9ef75660 (diff) |
nv50: make mm available as common code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_mm.h')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_mm.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_mm.h b/src/gallium/drivers/nouveau/nouveau_mm.h new file mode 100644 index 0000000000..23e50d4ae5 --- /dev/null +++ b/src/gallium/drivers/nouveau/nouveau_mm.h @@ -0,0 +1,29 @@ +#ifndef __NOUVEAU_MM_H__ +#define __NOUVEAU_MM_H__ + +struct nouveau_mman; + +/* 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 nouveau_mm_allocation { + struct nouveau_mm_allocation *next; + void *priv; + uint32_t offset; +}; + +extern struct nouveau_mman * +nouveau_mm_create(struct nouveau_device *, uint32_t domain, + uint32_t storage_type); + +extern void +nouveau_mm_destroy(struct nouveau_mman *); + +extern struct nouveau_mm_allocation * +nouveau_mm_allocate(struct nouveau_mman *, uint32_t size, + struct nouveau_bo **, uint32_t *offset); + +extern void +nouveau_mm_free(struct nouveau_mm_allocation *); + +#endif // __NOUVEAU_MM_H__ |