1 #ifndef __NV50_BAR_H__ 2 #define __NV50_BAR_H__ 3 #define nv50_bar(p) container_of((p), struct nv50_bar, base) 4 #include "priv.h" 5 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_vm *bar1_vm; 13 struct nvkm_gpuobj *bar1; 14 struct nvkm_vm *bar3_vm; 15 struct nvkm_gpuobj *bar3; 16 }; 17 18 int nv50_bar_new_(const struct nvkm_bar_func *, struct nvkm_device *, 19 int, u32 pgd_addr, struct nvkm_bar **); 20 void *nv50_bar_dtor(struct nvkm_bar *); 21 int nv50_bar_oneinit(struct nvkm_bar *); 22 int nv50_bar_init(struct nvkm_bar *); 23 struct nvkm_vm *nv50_bar_kmap(struct nvkm_bar *); 24 int nv50_bar_umap(struct nvkm_bar *, u64, int, struct nvkm_vma *); 25 void nv50_bar_unmap(struct nvkm_bar *, struct nvkm_vma *); 26 #endif 27