nouveau_mm.h revision 3464ebd5
1#ifndef __NOUVEAU_MM_H__
2#define __NOUVEAU_MM_H__
3
4struct nouveau_mman;
5
6/* Since a resource can be migrated, we need to decouple allocations from
7 * them. This struct is linked with fences for delayed freeing of allocs.
8 */
9struct nouveau_mm_allocation {
10   struct nouveau_mm_allocation *next;
11   void *priv;
12   uint32_t offset;
13};
14
15extern struct nouveau_mman *
16nouveau_mm_create(struct nouveau_device *, uint32_t domain,
17                  uint32_t storage_type);
18
19extern void
20nouveau_mm_destroy(struct nouveau_mman *);
21
22extern struct nouveau_mm_allocation *
23nouveau_mm_allocate(struct nouveau_mman *, uint32_t size,
24                    struct nouveau_bo **, uint32_t *offset);
25
26extern void
27nouveau_mm_free(struct nouveau_mm_allocation *);
28
29extern void
30nouveau_mm_free_work(void *);
31
32#endif // __NOUVEAU_MM_H__
33