Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / gpu / drm / nouveau / nvkm / engine / sw / chan.h
blobd42862fc43fda5519b4d30fb7073b349493d2603
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>
8 #include "priv.h"
10 struct nvkm_sw_chan {
11 const struct nvkm_sw_chan_func *func;
12 struct nvkm_object object;
13 struct nvkm_sw *sw;
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);
29 #endif