xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bar/nv50.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1 /*	$NetBSD: nv50.h,v 1.3 2021/12/18 23:45:38 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 #ifndef __NV50_BAR_H__
5 #define __NV50_BAR_H__
6 #define nv50_bar(p) container_of((p), struct nv50_bar, base)
7 #include "priv.h"
8 
9 struct nv50_bar {
10 	struct nvkm_bar base;
11 	u32 pgd_addr;
12 	struct nvkm_gpuobj *mem;
13 	struct nvkm_gpuobj *pad;
14 	struct nvkm_gpuobj *pgd;
15 	struct nvkm_vmm *bar1_vmm;
16 	struct nvkm_gpuobj *bar1;
17 	struct nvkm_vmm *bar2_vmm;
18 	struct nvkm_gpuobj *bar2;
19 };
20 
21 int nv50_bar_new_(const struct nvkm_bar_func *, struct nvkm_device *,
22 		  int, u32 pgd_addr, struct nvkm_bar **);
23 void *nv50_bar_dtor(struct nvkm_bar *);
24 int nv50_bar_oneinit(struct nvkm_bar *);
25 void nv50_bar_init(struct nvkm_bar *);
26 void nv50_bar_bar1_init(struct nvkm_bar *);
27 void nv50_bar_bar1_wait(struct nvkm_bar *);
28 struct nvkm_vmm *nv50_bar_bar1_vmm(struct nvkm_bar *);
29 void nv50_bar_bar2_init(struct nvkm_bar *);
30 struct nvkm_vmm *nv50_bar_bar2_vmm(struct nvkm_bar *);
31 #endif
32