xref: /linux/drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 #ifndef __NVKM_BAR_PRIV_H__
2 #define __NVKM_BAR_PRIV_H__
3 #define nvkm_bar(p) container_of((p), struct nvkm_bar, subdev)
4 #include <subdev/bar.h>
5 
6 void nvkm_bar_ctor(const struct nvkm_bar_func *, struct nvkm_device *,
7 		   int, struct nvkm_bar *);
8 
9 struct nvkm_bar_func {
10 	void *(*dtor)(struct nvkm_bar *);
11 	int (*oneinit)(struct nvkm_bar *);
12 	int (*init)(struct nvkm_bar *);
13 	struct nvkm_vm *(*kmap)(struct nvkm_bar *);
14 	int  (*umap)(struct nvkm_bar *, u64 size, int type, struct nvkm_vma *);
15 	void (*flush)(struct nvkm_bar *);
16 };
17 
18 void g84_bar_flush(struct nvkm_bar *);
19 #endif
20