2019-06-19 20:13:43 -04:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2015-08-20 14:54:19 +10:00
|
|
|
#ifndef __NVKM_FIFO_PRIV_H__
|
|
|
|
|
#define __NVKM_FIFO_PRIV_H__
|
2015-08-20 14:54:22 +10:00
|
|
|
#define nvkm_fifo(p) container_of((p), struct nvkm_fifo, engine)
|
2015-08-20 14:54:19 +10:00
|
|
|
#include <engine/fifo.h>
|
|
|
|
|
|
2020-12-04 15:29:16 +10:00
|
|
|
int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
|
|
|
|
|
int nr, struct nvkm_fifo *);
|
2015-08-20 14:54:22 +10:00
|
|
|
void nvkm_fifo_uevent(struct nvkm_fifo *);
|
2016-11-05 13:05:14 +10:00
|
|
|
void nvkm_fifo_kevent(struct nvkm_fifo *, int chid);
|
2017-01-26 12:10:24 +10:00
|
|
|
void nvkm_fifo_recover_chan(struct nvkm_fifo *, int chid);
|
2015-08-20 14:54:22 +10:00
|
|
|
|
2017-01-18 16:01:11 +10:00
|
|
|
struct nvkm_fifo_chan *
|
|
|
|
|
nvkm_fifo_chan_inst_locked(struct nvkm_fifo *, u64 inst);
|
|
|
|
|
|
2016-04-08 17:24:40 +10:00
|
|
|
struct nvkm_fifo_chan_oclass;
|
2015-08-20 14:54:22 +10:00
|
|
|
struct nvkm_fifo_func {
|
|
|
|
|
void *(*dtor)(struct nvkm_fifo *);
|
|
|
|
|
int (*oneinit)(struct nvkm_fifo *);
|
2018-05-08 20:39:46 +10:00
|
|
|
int (*info)(struct nvkm_fifo *, u64 mthd, u64 *data);
|
2015-08-20 14:54:22 +10:00
|
|
|
void (*init)(struct nvkm_fifo *);
|
|
|
|
|
void (*fini)(struct nvkm_fifo *);
|
|
|
|
|
void (*intr)(struct nvkm_fifo *);
|
2018-05-08 20:39:46 +10:00
|
|
|
void (*fault)(struct nvkm_fifo *, struct nvkm_fault_data *);
|
2021-02-06 18:41:07 +10:00
|
|
|
int (*engine_id)(struct nvkm_fifo *, struct nvkm_engine *);
|
2021-02-09 13:06:35 +10:00
|
|
|
struct nvkm_engine *(*id_engine)(struct nvkm_fifo *, int engi);
|
2015-08-20 14:54:22 +10:00
|
|
|
void (*pause)(struct nvkm_fifo *, unsigned long *);
|
|
|
|
|
void (*start)(struct nvkm_fifo *, unsigned long *);
|
|
|
|
|
void (*uevent_init)(struct nvkm_fifo *);
|
|
|
|
|
void (*uevent_fini)(struct nvkm_fifo *);
|
2017-01-26 12:10:24 +10:00
|
|
|
void (*recover_chan)(struct nvkm_fifo *, int chid);
|
2018-05-08 20:39:46 +10:00
|
|
|
int (*class_get)(struct nvkm_fifo *, int index, struct nvkm_oclass *);
|
|
|
|
|
int (*class_new)(struct nvkm_fifo *, const struct nvkm_oclass *,
|
|
|
|
|
void *, u32, struct nvkm_object **);
|
2015-08-20 14:54:22 +10:00
|
|
|
const struct nvkm_fifo_chan_oclass *chan[];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void nv04_fifo_intr(struct nvkm_fifo *);
|
2021-02-06 18:41:07 +10:00
|
|
|
int nv04_fifo_engine_id(struct nvkm_fifo *, struct nvkm_engine *);
|
2021-02-09 13:06:35 +10:00
|
|
|
struct nvkm_engine *nv04_fifo_id_engine(struct nvkm_fifo *, int);
|
2015-08-20 14:54:19 +10:00
|
|
|
void nv04_fifo_pause(struct nvkm_fifo *, unsigned long *);
|
|
|
|
|
void nv04_fifo_start(struct nvkm_fifo *, unsigned long *);
|
2019-06-13 13:58:50 +10:00
|
|
|
|
|
|
|
|
void gf100_fifo_intr_fault(struct nvkm_fifo *, int);
|
2021-02-06 18:41:07 +10:00
|
|
|
|
|
|
|
|
int gk104_fifo_engine_id(struct nvkm_fifo *, struct nvkm_engine *);
|
2021-02-09 13:06:35 +10:00
|
|
|
struct nvkm_engine *gk104_fifo_id_engine(struct nvkm_fifo *, int);
|
2015-08-20 14:54:19 +10:00
|
|
|
#endif
|