]>
Commit | Line | Data |
---|---|---|
24e8375b BS |
1 | #ifndef __NOUVEAU_VMA_H__ |
2 | #define __NOUVEAU_VMA_H__ | |
96da0bcd | 3 | #include <nvif/vmm.h> |
24e8375b BS |
4 | struct nouveau_bo; |
5 | struct nouveau_mem; | |
6 | ||
7 | struct nouveau_vma { | |
8 | struct nouveau_vmm *vmm; | |
9 | int refs; | |
10 | struct list_head head; | |
11 | u64 addr; | |
12 | ||
13 | struct nouveau_mem *mem; | |
24e8375b BS |
14 | }; |
15 | ||
16 | struct nouveau_vma *nouveau_vma_find(struct nouveau_bo *, struct nouveau_vmm *); | |
17 | int nouveau_vma_new(struct nouveau_bo *, struct nouveau_vmm *, | |
18 | struct nouveau_vma **); | |
19 | void nouveau_vma_del(struct nouveau_vma **); | |
20 | int nouveau_vma_map(struct nouveau_vma *, struct nouveau_mem *); | |
21 | void nouveau_vma_unmap(struct nouveau_vma *); | |
22 | ||
23 | struct nouveau_vmm { | |
24 | struct nouveau_cli *cli; | |
96da0bcd | 25 | struct nvif_vmm vmm; |
24e8375b BS |
26 | struct nvkm_vm *vm; |
27 | }; | |
28 | ||
29 | int nouveau_vmm_init(struct nouveau_cli *, s32 oclass, struct nouveau_vmm *); | |
30 | void nouveau_vmm_fini(struct nouveau_vmm *); | |
31 | #endif |