xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bar/gf100.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1 /*	$NetBSD: gf100.h,v 1.3 2021/12/18 23:45:38 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 #ifndef __GF100_BAR_H__
5 #define __GF100_BAR_H__
6 #define gf100_bar(p) container_of((p), struct gf100_bar, base)
7 #include "priv.h"
8 
9 struct gf100_barN {
10 	struct nvkm_memory *inst;
11 	struct nvkm_vmm *vmm;
12 };
13 
14 struct gf100_bar {
15 	struct nvkm_bar base;
16 	bool bar2_halve;
17 	struct gf100_barN bar[2];
18 };
19 
20 int gf100_bar_new_(const struct nvkm_bar_func *, struct nvkm_device *,
21 		   int, struct nvkm_bar **);
22 void *gf100_bar_dtor(struct nvkm_bar *);
23 int gf100_bar_oneinit(struct nvkm_bar *);
24 void gf100_bar_bar1_init(struct nvkm_bar *);
25 void gf100_bar_bar1_wait(struct nvkm_bar *);
26 struct nvkm_vmm *gf100_bar_bar1_vmm(struct nvkm_bar *);
27 void gf100_bar_bar2_init(struct nvkm_bar *);
28 struct nvkm_vmm *gf100_bar_bar2_vmm(struct nvkm_bar *);
29 #endif
30