linux/drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h
<<
>>
Prefs
   1#ifndef __NVKM_FIFO_H__
   2#define __NVKM_FIFO_H__
   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};
  13
  14struct nvkm_fifo_chan {
  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;
  25        void __iomem *user;
  26        u64 addr;
  27        u32 size;
  28
  29        struct nvkm_fifo_engn engn[NVKM_SUBDEV_NR];
  30};
  31
  32struct nvkm_fifo {
  33        const struct nvkm_fifo_func *func;
  34        struct nvkm_engine engine;
  35
  36        DECLARE_BITMAP(mask, NVKM_FIFO_CHID_NR);
  37        int nr;
  38        struct list_head chan;
  39        spinlock_t lock;
  40
  41        struct nvkm_event uevent; /* async user trigger */
  42        struct nvkm_event cevent; /* channel creation event */
  43};
  44
  45void nvkm_fifo_pause(struct nvkm_fifo *, unsigned long *);
  46void nvkm_fifo_start(struct nvkm_fifo *, unsigned long *);
  47
  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
  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 **);
  63int gk110_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
  64int gk208_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
  65int gk20a_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
  66int gm107_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
  67int gm200_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
  68int gm20b_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
  69int gp100_fifo_new(struct nvkm_device *, int, struct nvkm_fifo **);
  70#endif
  71