1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __GK104_FIFO_CHAN_H__ 3 #define __GK104_FIFO_CHAN_H__ 4 #define gk104_fifo_chan(p) container_of((p), struct gk104_fifo_chan, base) 5 #include "chan.h" 6 #include "gk104.h" 7 8 struct gk104_fifo_chan { 9 struct nvkm_fifo_chan base; 10 struct gk104_fifo *fifo; 11 int runl; 12 13 struct nvkm_fifo_cgrp *cgrp; 14 struct list_head head; 15 bool killed; 16 17 struct { 18 struct nvkm_gpuobj *inst; 19 struct nvkm_vma *vma; 20 } engn[NVKM_SUBDEV_NR]; 21 }; 22 23 extern const struct nvkm_fifo_chan_func gk104_fifo_gpfifo_func; 24 25 int gk104_fifo_gpfifo_new(struct gk104_fifo *, const struct nvkm_oclass *, 26 void *data, u32 size, struct nvkm_object **); 27 void *gk104_fifo_gpfifo_dtor(struct nvkm_fifo_chan *); 28 void gk104_fifo_gpfifo_init(struct nvkm_fifo_chan *); 29 void gk104_fifo_gpfifo_fini(struct nvkm_fifo_chan *); 30 int gk104_fifo_gpfifo_engine_ctor(struct nvkm_fifo_chan *, struct nvkm_engine *, 31 struct nvkm_object *); 32 void gk104_fifo_gpfifo_engine_dtor(struct nvkm_fifo_chan *, 33 struct nvkm_engine *); 34 int gk104_fifo_gpfifo_kick(struct gk104_fifo_chan *); 35 int gk104_fifo_gpfifo_kick_locked(struct gk104_fifo_chan *); 36 37 int gv100_fifo_gpfifo_new(struct gk104_fifo *, const struct nvkm_oclass *, 38 void *data, u32 size, struct nvkm_object **); 39 #endif 40