.. | .. |
---|
50 | 50 | |
---|
51 | 51 | #else /* One of the BSDs */ |
---|
52 | 52 | |
---|
| 53 | +#include <stdint.h> |
---|
53 | 54 | #include <sys/ioccom.h> |
---|
54 | 55 | #include <sys/types.h> |
---|
55 | 56 | typedef int8_t __s8; |
---|
.. | .. |
---|
649 | 650 | #define DRM_CAP_PAGE_FLIP_TARGET 0x11 |
---|
650 | 651 | #define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 |
---|
651 | 652 | #define DRM_CAP_SYNCOBJ 0x13 |
---|
| 653 | +#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 |
---|
652 | 654 | |
---|
653 | 655 | /** DRM_IOCTL_GET_CAP ioctl argument type */ |
---|
654 | 656 | struct drm_get_cap { |
---|
.. | .. |
---|
735 | 737 | __u32 pad; |
---|
736 | 738 | }; |
---|
737 | 739 | |
---|
| 740 | +struct drm_syncobj_transfer { |
---|
| 741 | + __u32 src_handle; |
---|
| 742 | + __u32 dst_handle; |
---|
| 743 | + __u64 src_point; |
---|
| 744 | + __u64 dst_point; |
---|
| 745 | + __u32 flags; |
---|
| 746 | + __u32 pad; |
---|
| 747 | +}; |
---|
| 748 | + |
---|
738 | 749 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) |
---|
739 | 750 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) |
---|
| 751 | +#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ |
---|
740 | 752 | struct drm_syncobj_wait { |
---|
741 | 753 | __u64 handles; |
---|
742 | 754 | /* absolute timeout */ |
---|
.. | .. |
---|
747 | 759 | __u32 pad; |
---|
748 | 760 | }; |
---|
749 | 761 | |
---|
| 762 | +struct drm_syncobj_timeline_wait { |
---|
| 763 | + __u64 handles; |
---|
| 764 | + /* wait on specific timeline point for every handles*/ |
---|
| 765 | + __u64 points; |
---|
| 766 | + /* absolute timeout */ |
---|
| 767 | + __s64 timeout_nsec; |
---|
| 768 | + __u32 count_handles; |
---|
| 769 | + __u32 flags; |
---|
| 770 | + __u32 first_signaled; /* only valid when not waiting all */ |
---|
| 771 | + __u32 pad; |
---|
| 772 | +}; |
---|
| 773 | + |
---|
| 774 | + |
---|
750 | 775 | struct drm_syncobj_array { |
---|
751 | 776 | __u64 handles; |
---|
752 | 777 | __u32 count_handles; |
---|
753 | 778 | __u32 pad; |
---|
754 | 779 | }; |
---|
| 780 | + |
---|
| 781 | +#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */ |
---|
| 782 | +struct drm_syncobj_timeline_array { |
---|
| 783 | + __u64 handles; |
---|
| 784 | + __u64 points; |
---|
| 785 | + __u32 count_handles; |
---|
| 786 | + __u32 flags; |
---|
| 787 | +}; |
---|
| 788 | + |
---|
755 | 789 | |
---|
756 | 790 | /* Query current scanout sequence number */ |
---|
757 | 791 | struct drm_crtc_get_sequence { |
---|
.. | .. |
---|
909 | 943 | #define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) |
---|
910 | 944 | #define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) |
---|
911 | 945 | |
---|
| 946 | +#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) |
---|
| 947 | +#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) |
---|
| 948 | +#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) |
---|
| 949 | +#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) |
---|
| 950 | + |
---|
| 951 | +#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) |
---|
| 952 | + |
---|
912 | 953 | /** |
---|
913 | 954 | * Device specific ioctls should only be in their respective headers |
---|
914 | 955 | * The device specific ioctl range is from 0x40 to 0x9f. |
---|