drm/nouveau/gr: convert user classes to new-style nvkm_object
[deliverable/linux.git] / drivers / gpu / drm / nouveau / nvkm / engine / gr / nv40.h
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(void *priv)
27 {
28 struct nvkm_device *device = nv_device(priv);
29
30 if ((device->chipset & 0xf0) == 0x60)
31 return 1;
32
33 return !(0x0baf & (1 << (device->chipset & 0x0f)));
34 }
35
36 int nv40_grctx_init(struct nvkm_device *, u32 *size);
37 void nv40_grctx_fill(struct nvkm_device *, struct nvkm_gpuobj *);
38 #endif
This page took 0.030544 seconds and 5 git commands to generate.