1 #ifndef __NVKM_GR_H__ 2 #define __NVKM_GR_H__ 3 #include <core/engctx.h> 4 5 struct nvkm_gr_chan { 6 struct nvkm_engctx base; 7 }; 8 9 #define nvkm_gr_context_create(p,e,c,g,s,a,f,d) \ 10 nvkm_engctx_create((p), (e), (c), (g), (s), (a), (f), (d)) 11 #define nvkm_gr_context_destroy(d) \ 12 nvkm_engctx_destroy(&(d)->base) 13 #define nvkm_gr_context_init(d) \ 14 nvkm_engctx_init(&(d)->base) 15 #define nvkm_gr_context_fini(d,s) \ 16 nvkm_engctx_fini(&(d)->base, (s)) 17 18 #define _nvkm_gr_context_dtor _nvkm_engctx_dtor 19 #define _nvkm_gr_context_init _nvkm_engctx_init 20 #define _nvkm_gr_context_fini _nvkm_engctx_fini 21 #define _nvkm_gr_context_rd32 _nvkm_engctx_rd32 22 #define _nvkm_gr_context_wr32 _nvkm_engctx_wr32 23 24 #include <core/engine.h> 25 26 struct nvkm_gr { 27 struct nvkm_engine base; 28 29 /* Returns chipset-specific counts of units packed into an u64. 30 */ 31 u64 (*units)(struct nvkm_gr *); 32 }; 33 34 static inline struct nvkm_gr * 35 nvkm_gr(void *obj) 36 { 37 return (void *)nvkm_engine(obj, NVDEV_ENGINE_GR); 38 } 39 40 #define nvkm_gr_create(p,e,c,y,d) \ 41 nvkm_engine_create((p), (e), (c), (y), "PGRAPH", "graphics", (d)) 42 #define nvkm_gr_destroy(d) \ 43 nvkm_engine_destroy(&(d)->base) 44 #define nvkm_gr_init(d) \ 45 nvkm_engine_init(&(d)->base) 46 #define nvkm_gr_fini(d,s) \ 47 nvkm_engine_fini(&(d)->base, (s)) 48 49 #define _nvkm_gr_dtor _nvkm_engine_dtor 50 #define _nvkm_gr_init _nvkm_engine_init 51 #define _nvkm_gr_fini _nvkm_engine_fini 52 53 extern struct nvkm_oclass nv04_gr_oclass; 54 extern struct nvkm_oclass nv10_gr_oclass; 55 extern struct nvkm_oclass nv20_gr_oclass; 56 extern struct nvkm_oclass nv25_gr_oclass; 57 extern struct nvkm_oclass nv2a_gr_oclass; 58 extern struct nvkm_oclass nv30_gr_oclass; 59 extern struct nvkm_oclass nv34_gr_oclass; 60 extern struct nvkm_oclass nv35_gr_oclass; 61 extern struct nvkm_oclass nv40_gr_oclass; 62 extern struct nvkm_oclass nv50_gr_oclass; 63 extern struct nvkm_oclass *gf100_gr_oclass; 64 extern struct nvkm_oclass *gf108_gr_oclass; 65 extern struct nvkm_oclass *gf104_gr_oclass; 66 extern struct nvkm_oclass *gf110_gr_oclass; 67 extern struct nvkm_oclass *gf117_gr_oclass; 68 extern struct nvkm_oclass *gf119_gr_oclass; 69 extern struct nvkm_oclass *gk104_gr_oclass; 70 extern struct nvkm_oclass *gk20a_gr_oclass; 71 extern struct nvkm_oclass *gk110_gr_oclass; 72 extern struct nvkm_oclass *gk110b_gr_oclass; 73 extern struct nvkm_oclass *gk208_gr_oclass; 74 extern struct nvkm_oclass *gm107_gr_oclass; 75 extern struct nvkm_oclass *gm204_gr_oclass; 76 extern struct nvkm_oclass *gm206_gr_oclass; 77 78 #include <core/enum.h> 79 80 extern const struct nvkm_bitfield nv04_gr_nsource[]; 81 extern struct nvkm_ofuncs nv04_gr_ofuncs; 82 bool nv04_gr_idle(void *obj); 83 84 extern const struct nvkm_bitfield nv10_gr_intr_name[]; 85 extern const struct nvkm_bitfield nv10_gr_nstatus[]; 86 87 extern const struct nvkm_enum nv50_data_error_names[]; 88 #endif 89