nouveau_chan.h 999 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef __NOUVEAU_CHAN_H__
  2. #define __NOUVEAU_CHAN_H__
  3. #include <nvif/object.h>
  4. #include <nvif/notify.h>
  5. struct nvif_device;
  6. struct nouveau_channel {
  7. struct nvif_device *device;
  8. struct nouveau_drm *drm;
  9. int chid;
  10. struct nvif_object vram;
  11. struct nvif_object gart;
  12. struct nvif_object nvsw;
  13. struct {
  14. struct nouveau_bo *buffer;
  15. struct nvkm_vma vma;
  16. struct nvif_object ctxdma;
  17. } push;
  18. /* TODO: this will be reworked in the near future */
  19. bool accel_done;
  20. void *fence;
  21. struct {
  22. int max;
  23. int free;
  24. int cur;
  25. int put;
  26. int ib_base;
  27. int ib_max;
  28. int ib_free;
  29. int ib_put;
  30. } dma;
  31. u32 user_get_hi;
  32. u32 user_get;
  33. u32 user_put;
  34. struct nvif_object user;
  35. struct nvif_notify kill;
  36. atomic_t killed;
  37. };
  38. int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *,
  39. u32 arg0, u32 arg1, struct nouveau_channel **);
  40. void nouveau_channel_del(struct nouveau_channel **);
  41. int nouveau_channel_idle(struct nouveau_channel *);
  42. extern int nouveau_vram_pushbuf;
  43. #endif