1 #ifndef __NVKM_NVSW_H__
2 #define __NVKM_NVSW_H__
3 #define nvkm_nvsw(p) container_of((p), struct nvkm_nvsw, object)
4 #include "priv.h"
5 
6 struct nvkm_nvsw {
7 	struct nvkm_object object;
8 	const struct nvkm_nvsw_func *func;
9 	struct nvkm_sw_chan *chan;
10 };
11 
12 struct nvkm_nvsw_func {
13 	int (*mthd)(struct nvkm_nvsw *, u32 mthd, void *data, u32 size);
14 };
15 
16 int nvkm_nvsw_new_(const struct nvkm_nvsw_func *, struct nvkm_sw_chan *,
17 		   const struct nvkm_oclass *, void *data, u32 size,
18 		   struct nvkm_object **pobject);
19 int nvkm_nvsw_new(struct nvkm_sw_chan *, const struct nvkm_oclass *,
20 		  void *data, u32 size, struct nvkm_object **pobject);
21 #endif
22