nouveau_chan.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_channel_new(struct nouveau_drm *, struct nvif_device *,
  41. u32 arg0, u32 arg1, struct nouveau_channel **);
  42. void nouveau_channel_del(struct nouveau_channel **);
  43. int nouveau_channel_idle(struct nouveau_channel *);
  44. extern int nouveau_vram_pushbuf;
  45. #endif