Merge tag 'upstream-4.6-rc1' of git://git.infradead.org/linux-ubifs
[deliverable/linux.git] / drivers / gpu / drm / nouveau / include / nvkm / engine / fifo.h
CommitLineData
05c7145d
BS
1#ifndef __NVKM_FIFO_H__
2#define __NVKM_FIFO_H__
8f0649b5
BS
3#include <core/engine.h>
4#include <core/event.h>
5
6#define NVKM_FIFO_CHID_NR 4096
7
8struct nvkm_fifo_engn {
9 struct nvkm_object *object;
10 int refcount;
11 int usecount;
12};
c420b2dc 13
05c7145d 14struct nvkm_fifo_chan {
8f0649b5
BS
15 const struct nvkm_fifo_chan_func *func;
16 struct nvkm_fifo *fifo;
17 u64 engines;
18 struct nvkm_object object;
19
20 struct list_head head;
21 u16 chid;
22 struct nvkm_gpuobj *inst;
23 struct nvkm_gpuobj *push;
24 struct nvkm_vm *vm;
ebb945a9 25 void __iomem *user;
6c6ae061 26 u64 addr;
ebb945a9 27 u32 size;
8f0649b5 28
68f3f702 29 struct nvkm_fifo_engn engn[NVKM_SUBDEV_NR];
ebb945a9
BS
30};
31
05c7145d 32struct nvkm_fifo {
8f0649b5 33 const struct nvkm_fifo_func *func;
13de7f46 34 struct nvkm_engine engine;
9bd2ddba 35
8f0649b5
BS
36 DECLARE_BITMAP(mask, NVKM_FIFO_CHID_NR);
37 int nr;
38 struct list_head chan;
ebb945a9 39 spinlock_t lock;
ebb945a9 40
13de7f46
BS
41 struct nvkm_event uevent; /* async user trigger */
42 struct nvkm_event cevent; /* channel creation event */
ebb945a9
BS
43};
44
13de7f46
BS
45void nvkm_fifo_pause(struct nvkm_fifo *, unsigned long *);
46void nvkm_fifo_start(struct nvkm_fifo *, unsigned long *);
8f0649b5 47
344c2d42
BS
48void nvkm_fifo_chan_put(struct nvkm_fifo *, unsigned long flags,
49 struct nvkm_fifo_chan **);
50struct nvkm_fifo_chan *
51nvkm_fifo_chan_inst(struct nvkm_fifo *, u64 inst, unsigned long *flags);
52struct nvkm_fifo_chan *
53nvkm_fifo_chan_chid(struct nvkm_fifo *, int chid, unsigned long *flags);
54
13de7f46
BS
55int nv04_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
56int nv10_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
57int nv17_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
58int nv40_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
59int nv50_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
60int g84_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
61int gf100_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
62int gk104_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
63f8c9b7 63int gk110_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
13de7f46
BS
64int gk208_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
65int gk20a_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
7c4f87c9 66int gm107_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
db1eb528 67int gm200_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
13de7f46 68int gm20b_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
c420b2dc 69#endif
This page took 0.262336 seconds and 5 git commands to generate.