1 #ifndef __NV40_GR_H__
2 #define __NV40_GR_H__
3 #define nv40_gr(p) container_of((p), struct nv40_gr, base)
4 #include "priv.h"
5 
6 struct nv40_gr {
7 	struct nvkm_gr base;
8 	u32 size;
9 	struct list_head chan;
10 };
11 
12 #define nv40_gr_chan(p) container_of((p), struct nv40_gr_chan, object)
13 
14 struct nv40_gr_chan {
15 	struct nvkm_object object;
16 	struct nv40_gr *gr;
17 	struct nvkm_fifo_chan *fifo;
18 	u32 inst;
19 	struct list_head head;
20 };
21 
22 /* returns 1 if device is one of the nv4x using the 0x4497 object class,
23  * helpful to determine a number of other hardware features
24  */
25 static inline int
26 nv44_gr_class(struct nvkm_device *device)
27 {
28 	if ((device->chipset & 0xf0) == 0x60)
29 		return 1;
30 
31 	return !(0x0baf & (1 << (device->chipset & 0x0f)));
32 }
33 
34 int  nv40_grctx_init(struct nvkm_device *, u32 *size);
35 void nv40_grctx_fill(struct nvkm_device *, struct nvkm_gpuobj *);
36 #endif
37