nouveau_vmm.h 793 B

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