nv50.h 896 B

1234567891011121314151617181920212223242526272829
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __NV50_BAR_H__
  3. #define __NV50_BAR_H__
  4. #define nv50_bar(p) container_of((p), struct nv50_bar, base)
  5. #include "priv.h"
  6. struct nv50_bar {
  7. struct nvkm_bar base;
  8. u32 pgd_addr;
  9. struct nvkm_gpuobj *mem;
  10. struct nvkm_gpuobj *pad;
  11. struct nvkm_gpuobj *pgd;
  12. struct nvkm_vmm *bar1_vmm;
  13. struct nvkm_gpuobj *bar1;
  14. struct nvkm_vmm *bar2_vmm;
  15. struct nvkm_gpuobj *bar2;
  16. };
  17. int nv50_bar_new_(const struct nvkm_bar_func *, struct nvkm_device *,
  18. int, u32 pgd_addr, struct nvkm_bar **);
  19. void *nv50_bar_dtor(struct nvkm_bar *);
  20. int nv50_bar_oneinit(struct nvkm_bar *);
  21. void nv50_bar_init(struct nvkm_bar *);
  22. void nv50_bar_bar1_init(struct nvkm_bar *);
  23. void nv50_bar_bar1_wait(struct nvkm_bar *);
  24. struct nvkm_vmm *nv50_bar_bar1_vmm(struct nvkm_bar *);
  25. void nv50_bar_bar2_init(struct nvkm_bar *);
  26. struct nvkm_vmm *nv50_bar_bar2_vmm(struct nvkm_bar *);
  27. #endif