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 *, 8 int index, int nr, struct nvkm_fifo *); 9 void nvkm_fifo_uevent(struct nvkm_fifo *); 10 void nvkm_fifo_cevent(struct nvkm_fifo *); 11 void nvkm_fifo_kevent(struct nvkm_fifo *, int chid); 12 void nvkm_fifo_recover_chan(struct nvkm_fifo *, int chid); 13 14 struct nvkm_fifo_chan * 15 nvkm_fifo_chan_inst_locked(struct nvkm_fifo *, u64 inst); 16 17 struct nvkm_fifo_chan_oclass; 18 struct nvkm_fifo_func { 19 void *(*dtor)(struct nvkm_fifo *); 20 int (*oneinit)(struct nvkm_fifo *); 21 int (*info)(struct nvkm_fifo *, u64 mthd, u64 *data); 22 void (*init)(struct nvkm_fifo *); 23 void (*fini)(struct nvkm_fifo *); 24 void (*intr)(struct nvkm_fifo *); 25 void (*fault)(struct nvkm_fifo *, struct nvkm_fault_data *); 26 void (*pause)(struct nvkm_fifo *, unsigned long *); 27 void (*start)(struct nvkm_fifo *, unsigned long *); 28 void (*uevent_init)(struct nvkm_fifo *); 29 void (*uevent_fini)(struct nvkm_fifo *); 30 void (*recover_chan)(struct nvkm_fifo *, int chid); 31 int (*class_get)(struct nvkm_fifo *, int index, struct nvkm_oclass *); 32 int (*class_new)(struct nvkm_fifo *, const struct nvkm_oclass *, 33 void *, u32, struct nvkm_object **); 34 const struct nvkm_fifo_chan_oclass *chan[]; 35 }; 36 37 void nv04_fifo_intr(struct nvkm_fifo *); 38 void nv04_fifo_pause(struct nvkm_fifo *, unsigned long *); 39 void nv04_fifo_start(struct nvkm_fifo *, unsigned long *); 40 #endif 41