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