xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/dma/priv.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1 /*	$NetBSD: priv.h,v 1.3 2021/12/18 23:45:35 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 #ifndef __NVKM_DMA_PRIV_H__
5 #define __NVKM_DMA_PRIV_H__
6 #define nvkm_dma(p) container_of((p), struct nvkm_dma, engine)
7 #include <engine/dma.h>
8 
9 struct nvkm_dmaobj_func {
10 	int (*bind)(struct nvkm_dmaobj *, struct nvkm_gpuobj *, int align,
11 		    struct nvkm_gpuobj **);
12 };
13 
14 int nvkm_dma_new_(const struct nvkm_dma_func *, struct nvkm_device *,
15 		  int index, struct nvkm_dma **);
16 
17 struct nvkm_dma_func {
18 	int (*class_new)(struct nvkm_dma *, const struct nvkm_oclass *,
19 			 void *data, u32 size, struct nvkm_dmaobj **);
20 };
21 #endif
22