1 /* $NetBSD: nouveau_vmm.h,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */ 2 3 #ifndef __NOUVEAU_VMA_H__ 4 #define __NOUVEAU_VMA_H__ 5 #include <nvif/vmm.h> 6 struct nouveau_bo; 7 struct nouveau_mem; 8 9 struct nouveau_vma { 10 struct nouveau_vmm *vmm; 11 int refs; 12 struct list_head head; 13 u64 addr; 14 15 struct nouveau_mem *mem; 16 17 struct nouveau_fence *fence; 18 }; 19 20 struct nouveau_vma *nouveau_vma_find(struct nouveau_bo *, struct nouveau_vmm *); 21 int nouveau_vma_new(struct nouveau_bo *, struct nouveau_vmm *, 22 struct nouveau_vma **); 23 void nouveau_vma_del(struct nouveau_vma **); 24 int nouveau_vma_map(struct nouveau_vma *, struct nouveau_mem *); 25 void nouveau_vma_unmap(struct nouveau_vma *); 26 27 struct nouveau_vmm { 28 struct nouveau_cli *cli; 29 struct nvif_vmm vmm; 30 struct nouveau_svmm *svmm; 31 }; 32 33 int nouveau_vmm_init(struct nouveau_cli *, s32 oclass, struct nouveau_vmm *); 34 void nouveau_vmm_fini(struct nouveau_vmm *); 35 #endif 36