1 #ifndef __NVKM_SW_CHAN_H__ 2 #define __NVKM_SW_CHAN_H__ 3 #define nvkm_sw_chan(p) container_of((p), struct nvkm_sw_chan, object) 4 #include "priv.h" 5 #include <core/event.h> 6 7 struct nvkm_sw_chan { 8 const struct nvkm_sw_chan_func *func; 9 struct nvkm_object object; 10 struct nvkm_sw *sw; 11 struct nvkm_fifo_chan *fifo; 12 struct list_head head; 13 14 struct nvkm_event event; 15 }; 16 17 struct nvkm_sw_chan_func { 18 void *(*dtor)(struct nvkm_sw_chan *); 19 bool (*mthd)(struct nvkm_sw_chan *, int subc, u32 mthd, u32 data); 20 }; 21 22 int nvkm_sw_chan_ctor(const struct nvkm_sw_chan_func *, struct nvkm_sw *, 23 struct nvkm_fifo_chan *, const struct nvkm_oclass *, 24 struct nvkm_sw_chan *); 25 bool nvkm_sw_chan_mthd(struct nvkm_sw_chan *, int subc, u32 mthd, u32 data); 26 #endif 27