1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVKM_SW_CHAN_H__
3 #define __NVKM_SW_CHAN_H__
4 #define nvkm_sw_chan(p) container_of((p), struct nvkm_sw_chan, object)
5 #include <core/object.h>
6 #include <core/event.h>
11 const struct nvkm_sw_chan_func
*func
;
12 struct nvkm_object object
;
14 struct nvkm_fifo_chan
*fifo
;
15 struct list_head head
;
17 struct nvkm_event event
;
20 struct nvkm_sw_chan_func
{
21 void *(*dtor
)(struct nvkm_sw_chan
*);
22 bool (*mthd
)(struct nvkm_sw_chan
*, int subc
, u32 mthd
, u32 data
);
25 int nvkm_sw_chan_ctor(const struct nvkm_sw_chan_func
*, struct nvkm_sw
*,
26 struct nvkm_fifo_chan
*, const struct nvkm_oclass
*,
27 struct nvkm_sw_chan
*);
28 bool nvkm_sw_chan_mthd(struct nvkm_sw_chan
*, int subc
, u32 mthd
, u32 data
);