Home | History | Annotate | Line # | Download | only in fifo
      1 /*	$NetBSD: channv50.h,v 1.3 2021/12/18 23:45:35 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __NV50_FIFO_CHAN_H__
      5 #define __NV50_FIFO_CHAN_H__
      6 #define nv50_fifo_chan(p) container_of((p), struct nv50_fifo_chan, base)
      7 #include "chan.h"
      8 #include "nv50.h"
      9 
     10 struct nv50_fifo_chan {
     11 	struct nv50_fifo *fifo;
     12 	struct nvkm_fifo_chan base;
     13 
     14 	struct nvkm_gpuobj *ramfc;
     15 	struct nvkm_gpuobj *cache;
     16 	struct nvkm_gpuobj *eng;
     17 	struct nvkm_gpuobj *pgd;
     18 	struct nvkm_ramht *ramht;
     19 
     20 	struct nvkm_gpuobj *engn[NVKM_SUBDEV_NR];
     21 };
     22 
     23 int nv50_fifo_chan_ctor(struct nv50_fifo *, u64 vmm, u64 push,
     24 			const struct nvkm_oclass *, struct nv50_fifo_chan *);
     25 void *nv50_fifo_chan_dtor(struct nvkm_fifo_chan *);
     26 void nv50_fifo_chan_fini(struct nvkm_fifo_chan *);
     27 void nv50_fifo_chan_engine_dtor(struct nvkm_fifo_chan *, struct nvkm_engine *);
     28 void nv50_fifo_chan_object_dtor(struct nvkm_fifo_chan *, int);
     29 
     30 int g84_fifo_chan_ctor(struct nv50_fifo *, u64 vmm, u64 push,
     31 		       const struct nvkm_oclass *, struct nv50_fifo_chan *);
     32 
     33 extern const struct nvkm_fifo_chan_oclass nv50_fifo_dma_oclass;
     34 extern const struct nvkm_fifo_chan_oclass nv50_fifo_gpfifo_oclass;
     35 extern const struct nvkm_fifo_chan_oclass g84_fifo_dma_oclass;
     36 extern const struct nvkm_fifo_chan_oclass g84_fifo_gpfifo_oclass;
     37 #endif
     38