nouveau_abi16.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef __NOUVEAU_ABI16_H__
  2. #define __NOUVEAU_ABI16_H__
  3. #define ABI16_IOCTL_ARGS \
  4. struct drm_device *dev, void *data, struct drm_file *file_priv
  5. int nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS);
  6. int nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS);
  7. int nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS);
  8. int nouveau_abi16_ioctl_channel_free(ABI16_IOCTL_ARGS);
  9. int nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS);
  10. int nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS);
  11. int nouveau_abi16_ioctl_gpuobj_free(ABI16_IOCTL_ARGS);
  12. struct drm_nouveau_channel_alloc {
  13. uint32_t fb_ctxdma_handle;
  14. uint32_t tt_ctxdma_handle;
  15. int channel;
  16. uint32_t pushbuf_domains;
  17. /* Notifier memory */
  18. uint32_t notifier_handle;
  19. /* DRM-enforced subchannel assignments */
  20. struct {
  21. uint32_t handle;
  22. uint32_t grclass;
  23. } subchan[8];
  24. uint32_t nr_subchan;
  25. };
  26. struct drm_nouveau_channel_free {
  27. int channel;
  28. };
  29. struct drm_nouveau_grobj_alloc {
  30. int channel;
  31. uint32_t handle;
  32. int class;
  33. };
  34. struct drm_nouveau_notifierobj_alloc {
  35. uint32_t channel;
  36. uint32_t handle;
  37. uint32_t size;
  38. uint32_t offset;
  39. };
  40. struct drm_nouveau_gpuobj_free {
  41. int channel;
  42. uint32_t handle;
  43. };
  44. #define NOUVEAU_GETPARAM_PCI_VENDOR 3
  45. #define NOUVEAU_GETPARAM_PCI_DEVICE 4
  46. #define NOUVEAU_GETPARAM_BUS_TYPE 5
  47. #define NOUVEAU_GETPARAM_FB_SIZE 8
  48. #define NOUVEAU_GETPARAM_AGP_SIZE 9
  49. #define NOUVEAU_GETPARAM_CHIPSET_ID 11
  50. #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12
  51. #define NOUVEAU_GETPARAM_GRAPH_UNITS 13
  52. #define NOUVEAU_GETPARAM_PTIMER_TIME 14
  53. #define NOUVEAU_GETPARAM_HAS_BO_USAGE 15
  54. #define NOUVEAU_GETPARAM_HAS_PAGEFLIP 16
  55. struct drm_nouveau_getparam {
  56. uint64_t param;
  57. uint64_t value;
  58. };
  59. struct drm_nouveau_setparam {
  60. uint64_t param;
  61. uint64_t value;
  62. };
  63. #define DRM_IOCTL_NOUVEAU_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GETPARAM, struct drm_nouveau_getparam)
  64. #define DRM_IOCTL_NOUVEAU_SETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SETPARAM, struct drm_nouveau_setparam)
  65. #define DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_ALLOC, struct drm_nouveau_channel_alloc)
  66. #define DRM_IOCTL_NOUVEAU_CHANNEL_FREE DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_FREE, struct drm_nouveau_channel_free)
  67. #define DRM_IOCTL_NOUVEAU_GROBJ_ALLOC DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GROBJ_ALLOC, struct drm_nouveau_grobj_alloc)
  68. #define DRM_IOCTL_NOUVEAU_NOTIFIEROBJ_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_NOTIFIEROBJ_ALLOC, struct drm_nouveau_notifierobj_alloc)
  69. #define DRM_IOCTL_NOUVEAU_GPUOBJ_FREE DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GPUOBJ_FREE, struct drm_nouveau_gpuobj_free)
  70. #endif