0001 #ifndef __NOUVEAU_VMA_H__
0002 #define __NOUVEAU_VMA_H__
0003 #include <nvif/vmm.h>
0004 struct nouveau_bo;
0005 struct nouveau_mem;
0006
0007 struct nouveau_vma {
0008 struct nouveau_vmm *vmm;
0009 int refs;
0010 struct list_head head;
0011 u64 addr;
0012
0013 struct nouveau_mem *mem;
0014
0015 struct nouveau_fence *fence;
0016 };
0017
0018 struct nouveau_vma *nouveau_vma_find(struct nouveau_bo *, struct nouveau_vmm *);
0019 int nouveau_vma_new(struct nouveau_bo *, struct nouveau_vmm *,
0020 struct nouveau_vma **);
0021 void nouveau_vma_del(struct nouveau_vma **);
0022 int nouveau_vma_map(struct nouveau_vma *, struct nouveau_mem *);
0023 void nouveau_vma_unmap(struct nouveau_vma *);
0024
0025 struct nouveau_vmm {
0026 struct nouveau_cli *cli;
0027 struct nvif_vmm vmm;
0028 struct nouveau_svmm *svmm;
0029 };
0030
0031 int nouveau_vmm_init(struct nouveau_cli *, s32 oclass, struct nouveau_vmm *);
0032 void nouveau_vmm_fini(struct nouveau_vmm *);
0033 #endif