nouveau_vmm.h 831 B

123456789101112131415161718192021222324252627282930313233
  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. struct nouveau_fence *fence;
  13. };
  14. struct nouveau_vma *nouveau_vma_find(struct nouveau_bo *, struct nouveau_vmm *);
  15. int nouveau_vma_new(struct nouveau_bo *, struct nouveau_vmm *,
  16. struct nouveau_vma **);
  17. void nouveau_vma_del(struct nouveau_vma **);
  18. int nouveau_vma_map(struct nouveau_vma *, struct nouveau_mem *);
  19. void nouveau_vma_unmap(struct nouveau_vma *);
  20. struct nouveau_vmm {
  21. struct nouveau_cli *cli;
  22. struct nvif_vmm vmm;
  23. struct nouveau_svmm *svmm;
  24. };
  25. int nouveau_vmm_init(struct nouveau_cli *, s32 oclass, struct nouveau_vmm *);
  26. void nouveau_vmm_fini(struct nouveau_vmm *);
  27. #endif