1 /* SPDX-License-Identifier: MIT */ 2 #ifndef __NVKM_FIFO_PRIV_H__ 3 #define __NVKM_FIFO_PRIV_H__ 4 #define nvkm_fifo(p) container_of((p), struct nvkm_fifo, engine) 5 #include <engine/fifo.h> 6 7 int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *, enum nvkm_subdev_type, int, 8 int nr, struct nvkm_fifo *); 9 void nvkm_fifo_uevent(struct nvkm_fifo *); 10 void nvkm_fifo_kevent(struct nvkm_fifo *, int chid); 11 void nvkm_fifo_recover_chan(struct nvkm_fifo *, int chid); 12 13 struct nvkm_fifo_chan * 14 nvkm_fifo_chan_inst_locked(struct nvkm_fifo *, u64 inst); 15 16 struct nvkm_fifo_chan_oclass; 17 struct nvkm_fifo_func { 18 void *(*dtor)(struct nvkm_fifo *); 19 int (*oneinit)(struct nvkm_fifo *); 20 int (*info)(struct nvkm_fifo *, u64 mthd, u64 *data); 21 void (*init)(struct nvkm_fifo *); 22 void (*fini)(struct nvkm_fifo *); 23 void (*intr)(struct nvkm_fifo *); 24 void (*fault)(struct nvkm_fifo *, struct nvkm_fault_data *); 25 int (*engine_id)(struct nvkm_fifo *, struct nvkm_engine *); 26 struct nvkm_engine *(*id_engine)(struct nvkm_fifo *, int engi); 27 void (*pause)(struct nvkm_fifo *, unsigned long *); 28 void (*start)(struct nvkm_fifo *, unsigned long *); 29 void (*uevent_init)(struct nvkm_fifo *); 30 void (*uevent_fini)(struct nvkm_fifo *); 31 void (*recover_chan)(struct nvkm_fifo *, int chid); 32 int (*class_get)(struct nvkm_fifo *, int index, struct nvkm_oclass *); 33 int (*class_new)(struct nvkm_fifo *, const struct nvkm_oclass *, 34 void *, u32, struct nvkm_object **); 35 const struct nvkm_fifo_chan_oclass *chan[]; 36 }; 37 38 void nv04_fifo_intr(struct nvkm_fifo *); 39 int nv04_fifo_engine_id(struct nvkm_fifo *, struct nvkm_engine *); 40 struct nvkm_engine *nv04_fifo_id_engine(struct nvkm_fifo *, int); 41 void nv04_fifo_pause(struct nvkm_fifo *, unsigned long *); 42 void nv04_fifo_start(struct nvkm_fifo *, unsigned long *); 43 44 void gf100_fifo_intr_fault(struct nvkm_fifo *, int); 45 46 int gk104_fifo_engine_id(struct nvkm_fifo *, struct nvkm_engine *); 47 struct nvkm_engine *gk104_fifo_id_engine(struct nvkm_fifo *, int); 48 #endif 49