1 #ifndef __NVKM_SW_CHAN_H__
2 #define __NVKM_SW_CHAN_H__
3 #include "priv.h"
4 #include <core/engctx.h>
5 #include <core/event.h>
6 
7 struct nvkm_sw_chan {
8 	struct nvkm_engctx base;
9 	struct nvkm_event event;
10 };
11 
12 #define nvkm_sw_context_create(p,e,c,d)                               \
13 	nvkm_sw_chan_ctor((p), (e), (c), sizeof(**d), (void **)d)
14 int nvkm_sw_chan_ctor(struct nvkm_object *, struct nvkm_object *,
15 		      struct nvkm_oclass *, int, void **);
16 void nvkm_sw_chan_dtor(struct nvkm_object *);
17 #define nvkm_sw_context_init(d)                                       \
18 	nvkm_engctx_init(&(d)->base)
19 #define nvkm_sw_context_fini(d,s)                                     \
20 	nvkm_engctx_fini(&(d)->base, (s))
21 
22 #define _nvkm_sw_context_dtor nvkm_sw_chan_dtor
23 #define _nvkm_sw_context_init _nvkm_engctx_init
24 #define _nvkm_sw_context_fini _nvkm_engctx_fini
25 #endif
26