priv.h (2035B)
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 7int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *, enum nvkm_subdev_type, int, 8 int nr, struct nvkm_fifo *); 9void nvkm_fifo_uevent(struct nvkm_fifo *); 10void nvkm_fifo_cevent(struct nvkm_fifo *); 11void nvkm_fifo_kevent(struct nvkm_fifo *, int chid); 12void nvkm_fifo_recover_chan(struct nvkm_fifo *, int chid); 13 14struct nvkm_fifo_chan * 15nvkm_fifo_chan_inst_locked(struct nvkm_fifo *, u64 inst); 16 17struct nvkm_fifo_chan_oclass; 18struct 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 int (*engine_id)(struct nvkm_fifo *, struct nvkm_engine *); 27 struct nvkm_engine *(*id_engine)(struct nvkm_fifo *, int engi); 28 void (*pause)(struct nvkm_fifo *, unsigned long *); 29 void (*start)(struct nvkm_fifo *, unsigned long *); 30 void (*uevent_init)(struct nvkm_fifo *); 31 void (*uevent_fini)(struct nvkm_fifo *); 32 void (*recover_chan)(struct nvkm_fifo *, int chid); 33 int (*class_get)(struct nvkm_fifo *, int index, struct nvkm_oclass *); 34 int (*class_new)(struct nvkm_fifo *, const struct nvkm_oclass *, 35 void *, u32, struct nvkm_object **); 36 const struct nvkm_fifo_chan_oclass *chan[]; 37}; 38 39void nv04_fifo_intr(struct nvkm_fifo *); 40int nv04_fifo_engine_id(struct nvkm_fifo *, struct nvkm_engine *); 41struct nvkm_engine *nv04_fifo_id_engine(struct nvkm_fifo *, int); 42void nv04_fifo_pause(struct nvkm_fifo *, unsigned long *); 43void nv04_fifo_start(struct nvkm_fifo *, unsigned long *); 44 45void gf100_fifo_intr_fault(struct nvkm_fifo *, int); 46 47int gk104_fifo_engine_id(struct nvkm_fifo *, struct nvkm_engine *); 48struct nvkm_engine *gk104_fifo_id_engine(struct nvkm_fifo *, int); 49#endif