1 #ifndef __GF100_BAR_H__
2 #define __GF100_BAR_H__
3 #define gf100_bar(p) container_of((p), struct gf100_bar, base)
4 #include "priv.h"
5 
6 struct gf100_barN {
7 	struct nvkm_memory *mem;
8 	struct nvkm_gpuobj *pgd;
9 	struct nvkm_vm *vm;
10 };
11 
12 struct gf100_bar {
13 	struct nvkm_bar base;
14 	bool bar2_halve;
15 	struct gf100_barN bar[2];
16 };
17 
18 int gf100_bar_new_(const struct nvkm_bar_func *, struct nvkm_device *,
19 		   int, struct nvkm_bar **);
20 void *gf100_bar_dtor(struct nvkm_bar *);
21 int gf100_bar_oneinit(struct nvkm_bar *);
22 void gf100_bar_bar1_init(struct nvkm_bar *);
23 void gf100_bar_bar1_wait(struct nvkm_bar *);
24 struct nvkm_vmm *gf100_bar_bar1_vmm(struct nvkm_bar *);
25 void gf100_bar_bar2_init(struct nvkm_bar *);
26 struct nvkm_vmm *gf100_bar_bar2_vmm(struct nvkm_bar *);
27 #endif
28