2015-01-14 05:28:47 +00:00
|
|
|
#ifndef __NVKM_FIFO_H__
|
|
|
|
#define __NVKM_FIFO_H__
|
2015-08-20 04:54:19 +00:00
|
|
|
#include <core/engine.h>
|
|
|
|
#include <core/event.h>
|
|
|
|
|
|
|
|
#define NVKM_FIFO_CHID_NR 4096
|
|
|
|
|
|
|
|
struct nvkm_fifo_engn {
|
|
|
|
struct nvkm_object *object;
|
|
|
|
int refcount;
|
|
|
|
int usecount;
|
|
|
|
};
|
2012-05-01 10:48:08 +00:00
|
|
|
|
2015-01-14 05:28:47 +00:00
|
|
|
struct nvkm_fifo_chan {
|
2015-08-20 04:54:19 +00:00
|
|
|
const struct nvkm_fifo_chan_func *func;
|
|
|
|
struct nvkm_fifo *fifo;
|
|
|
|
u64 engines;
|
|
|
|
struct nvkm_object object;
|
|
|
|
|
|
|
|
struct list_head head;
|
|
|
|
u16 chid;
|
|
|
|
struct nvkm_gpuobj *inst;
|
|
|
|
struct nvkm_gpuobj *push;
|
|
|
|
struct nvkm_vm *vm;
|
2012-07-19 22:17:34 +00:00
|
|
|
void __iomem *user;
|
2014-08-09 18:10:25 +00:00
|
|
|
u64 addr;
|
2012-07-19 22:17:34 +00:00
|
|
|
u32 size;
|
2015-08-20 04:54:19 +00:00
|
|
|
|
2015-08-20 04:54:22 +00:00
|
|
|
struct nvkm_fifo_engn engn[NVKM_SUBDEV_NR];
|
2012-07-19 22:17:34 +00:00
|
|
|
};
|
|
|
|
|
2015-01-14 05:28:47 +00:00
|
|
|
struct nvkm_fifo {
|
2015-08-20 04:54:19 +00:00
|
|
|
const struct nvkm_fifo_func *func;
|
2015-08-20 04:54:22 +00:00
|
|
|
struct nvkm_engine engine;
|
2013-01-31 03:51:20 +00:00
|
|
|
|
2015-08-20 04:54:19 +00:00
|
|
|
DECLARE_BITMAP(mask, NVKM_FIFO_CHID_NR);
|
|
|
|
int nr;
|
|
|
|
struct list_head chan;
|
2012-07-19 22:17:34 +00:00
|
|
|
spinlock_t lock;
|
|
|
|
|
2015-08-20 04:54:22 +00:00
|
|
|
struct nvkm_event uevent; /* async user trigger */
|
|
|
|
struct nvkm_event cevent; /* channel creation event */
|
2012-07-19 22:17:34 +00:00
|
|
|
};
|
|
|
|
|
2015-08-20 04:54:22 +00:00
|
|
|
void nvkm_fifo_pause(struct nvkm_fifo *, unsigned long *);
|
|
|
|
void nvkm_fifo_start(struct nvkm_fifo *, unsigned long *);
|
2015-08-20 04:54:19 +00:00
|
|
|
|
2015-08-20 04:54:18 +00:00
|
|
|
void nvkm_fifo_chan_put(struct nvkm_fifo *, unsigned long flags,
|
|
|
|
struct nvkm_fifo_chan **);
|
|
|
|
struct nvkm_fifo_chan *
|
|
|
|
nvkm_fifo_chan_inst(struct nvkm_fifo *, u64 inst, unsigned long *flags);
|
|
|
|
struct nvkm_fifo_chan *
|
|
|
|
nvkm_fifo_chan_chid(struct nvkm_fifo *, int chid, unsigned long *flags);
|
|
|
|
|
2015-08-20 04:54:22 +00:00
|
|
|
int nv04_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
|
|
|
int nv10_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
|
|
|
int nv17_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
|
|
|
int nv40_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
|
|
|
int nv50_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
|
|
|
int g84_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
|
|
|
int gf100_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
|
|
|
int gk104_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
2016-03-11 03:09:28 +00:00
|
|
|
int gk110_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
2015-08-20 04:54:22 +00:00
|
|
|
int gk208_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
|
|
|
int gk20a_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
2016-03-11 03:09:28 +00:00
|
|
|
int gm107_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
2016-02-10 22:35:32 +00:00
|
|
|
int gm200_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
2015-08-20 04:54:22 +00:00
|
|
|
int gm20b_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
2016-07-09 00:41:01 +00:00
|
|
|
int gp100_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
|
2012-05-01 10:48:08 +00:00
|
|
|
#endif
|