nouveau_chan.h 1.1 KB

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