xref: /linux/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h (revision 6fdcba32711044c35c0e1b094cbd8f3f0b4472c9)
1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NV20_GR_H__
3 #define __NV20_GR_H__
4 #define nv20_gr(p) container_of((p), struct nv20_gr, base)
5 #include "priv.h"
6 
7 struct nv20_gr {
8 	struct nvkm_gr base;
9 	struct nvkm_memory *ctxtab;
10 };
11 
12 int nv20_gr_new_(const struct nvkm_gr_func *, struct nvkm_device *,
13 		 int, struct nvkm_gr **);
14 void *nv20_gr_dtor(struct nvkm_gr *);
15 int nv20_gr_oneinit(struct nvkm_gr *);
16 int nv20_gr_init(struct nvkm_gr *);
17 void nv20_gr_intr(struct nvkm_gr *);
18 void nv20_gr_tile(struct nvkm_gr *, int, struct nvkm_fb_tile *);
19 
20 int nv30_gr_init(struct nvkm_gr *);
21 
22 #define nv20_gr_chan(p) container_of((p), struct nv20_gr_chan, object)
23 #include <core/object.h>
24 
25 struct nv20_gr_chan {
26 	struct nvkm_object object;
27 	struct nv20_gr *gr;
28 	int chid;
29 	struct nvkm_memory *inst;
30 };
31 
32 void *nv20_gr_chan_dtor(struct nvkm_object *);
33 int nv20_gr_chan_init(struct nvkm_object *);
34 int nv20_gr_chan_fini(struct nvkm_object *, bool);
35 #endif
36