1 #ifndef __NV50_GR_H__ 2 #define __NV50_GR_H__ 3 #define nv50_gr(p) container_of((p), struct nv50_gr, base) 4 #include "priv.h" 5 6 struct nv50_gr { 7 struct nvkm_gr base; 8 const struct nv50_gr_func *func; 9 spinlock_t lock; 10 u32 size; 11 }; 12 13 int nv50_gr_new_(const struct nvkm_gr_func *, struct nvkm_device *, int index, 14 struct nvkm_gr **); 15 int nv50_gr_init(struct nvkm_gr *); 16 void nv50_gr_intr(struct nvkm_gr *); 17 u64 nv50_gr_units(struct nvkm_gr *); 18 19 int g84_gr_tlb_flush(struct nvkm_gr *); 20 21 #define nv50_gr_chan(p) container_of((p), struct nv50_gr_chan, object) 22 23 struct nv50_gr_chan { 24 struct nvkm_object object; 25 struct nv50_gr *gr; 26 }; 27 28 int nv50_gr_chan_new(struct nvkm_gr *, struct nvkm_fifo_chan *, 29 const struct nvkm_oclass *, struct nvkm_object **); 30 31 extern const struct nvkm_object_func nv50_gr_object; 32 33 int nv50_grctx_init(struct nvkm_device *, u32 *size); 34 void nv50_grctx_fill(struct nvkm_device *, struct nvkm_gpuobj *); 35 #endif 36