priv.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef __NVKM_FIFO_PRIV_H__
  2. #define __NVKM_FIFO_PRIV_H__
  3. #define nvkm_fifo(p) container_of((p), struct nvkm_fifo, engine)
  4. #include <engine/fifo.h>
  5. int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *,
  6. int index, int nr, struct nvkm_fifo *);
  7. void nvkm_fifo_uevent(struct nvkm_fifo *);
  8. void nvkm_fifo_cevent(struct nvkm_fifo *);
  9. void nvkm_fifo_kevent(struct nvkm_fifo *, int chid);
  10. void nvkm_fifo_recover_chan(struct nvkm_fifo *, int chid);
  11. struct nvkm_fifo_chan *
  12. nvkm_fifo_chan_inst_locked(struct nvkm_fifo *, u64 inst);
  13. struct nvkm_fifo_chan_oclass;
  14. struct nvkm_fifo_func {
  15. void *(*dtor)(struct nvkm_fifo *);
  16. int (*oneinit)(struct nvkm_fifo *);
  17. void (*init)(struct nvkm_fifo *);
  18. void (*fini)(struct nvkm_fifo *);
  19. void (*intr)(struct nvkm_fifo *);
  20. void (*pause)(struct nvkm_fifo *, unsigned long *);
  21. void (*start)(struct nvkm_fifo *, unsigned long *);
  22. void (*uevent_init)(struct nvkm_fifo *);
  23. void (*uevent_fini)(struct nvkm_fifo *);
  24. void (*recover_chan)(struct nvkm_fifo *, int chid);
  25. int (*class_get)(struct nvkm_fifo *, int index,
  26. const struct nvkm_fifo_chan_oclass **);
  27. const struct nvkm_fifo_chan_oclass *chan[];
  28. };
  29. void nv04_fifo_intr(struct nvkm_fifo *);
  30. void nv04_fifo_pause(struct nvkm_fifo *, unsigned long *);
  31. void nv04_fifo_start(struct nvkm_fifo *, unsigned long *);
  32. #endif