xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/sw/priv.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1 /*	$NetBSD: priv.h,v 1.3 2021/12/18 23:45:37 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 #ifndef __NVKM_SW_PRIV_H__
5 #define __NVKM_SW_PRIV_H__
6 #define nvkm_sw(p) container_of((p), struct nvkm_sw, engine)
7 #include <engine/sw.h>
8 struct nvkm_sw_chan;
9 
10 int nvkm_sw_new_(const struct nvkm_sw_func *, struct nvkm_device *,
11 		 int index, struct nvkm_sw **);
12 
13 struct nvkm_sw_chan_sclass {
14 	int (*ctor)(struct nvkm_sw_chan *, const struct nvkm_oclass *,
15 		    void *data, u32 size, struct nvkm_object **);
16 	struct nvkm_sclass base;
17 };
18 
19 struct nvkm_sw_func {
20 	int (*chan_new)(struct nvkm_sw *, struct nvkm_fifo_chan *,
21 			const struct nvkm_oclass *, struct nvkm_object **);
22 	const struct nvkm_sw_chan_sclass sclass[];
23 };
24 #endif
25