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