1 #ifndef __NVKM_SW_H__ 2 #define __NVKM_SW_H__ 3 #include <core/engctx.h> 4 5 struct nvkm_sw_chan { 6 struct nvkm_engctx base; 7 8 int (*flip)(void *); 9 void *flip_data; 10 }; 11 12 #define nvkm_sw_context_create(p,e,c,d) \ 13 nvkm_engctx_create((p), (e), (c), (p), 0, 0, 0, (d)) 14 #define nvkm_sw_context_destroy(d) \ 15 nvkm_engctx_destroy(&(d)->base) 16 #define nvkm_sw_context_init(d) \ 17 nvkm_engctx_init(&(d)->base) 18 #define nvkm_sw_context_fini(d,s) \ 19 nvkm_engctx_fini(&(d)->base, (s)) 20 21 #define _nvkm_sw_context_dtor _nvkm_engctx_dtor 22 #define _nvkm_sw_context_init _nvkm_engctx_init 23 #define _nvkm_sw_context_fini _nvkm_engctx_fini 24 25 #include <core/engine.h> 26 27 struct nvkm_sw { 28 struct nvkm_engine base; 29 }; 30 31 #define nvkm_sw_create(p,e,c,d) \ 32 nvkm_engine_create((p), (e), (c), true, "SW", "software", (d)) 33 #define nvkm_sw_destroy(d) \ 34 nvkm_engine_destroy(&(d)->base) 35 #define nvkm_sw_init(d) \ 36 nvkm_engine_init(&(d)->base) 37 #define nvkm_sw_fini(d,s) \ 38 nvkm_engine_fini(&(d)->base, (s)) 39 40 #define _nvkm_sw_dtor _nvkm_engine_dtor 41 #define _nvkm_sw_init _nvkm_engine_init 42 #define _nvkm_sw_fini _nvkm_engine_fini 43 44 extern struct nvkm_oclass *nv04_sw_oclass; 45 extern struct nvkm_oclass *nv10_sw_oclass; 46 extern struct nvkm_oclass *nv50_sw_oclass; 47 extern struct nvkm_oclass *gf100_sw_oclass; 48 49 void nv04_sw_intr(struct nvkm_subdev *); 50 #endif 51