hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/uapi/drm/drm.h
....@@ -50,6 +50,7 @@
5050
5151 #else /* One of the BSDs */
5252
53
+#include <stdint.h>
5354 #include <sys/ioccom.h>
5455 #include <sys/types.h>
5556 typedef int8_t __s8;
....@@ -649,6 +650,7 @@
649650 #define DRM_CAP_PAGE_FLIP_TARGET 0x11
650651 #define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
651652 #define DRM_CAP_SYNCOBJ 0x13
653
+#define DRM_CAP_SYNCOBJ_TIMELINE 0x14
652654
653655 /** DRM_IOCTL_GET_CAP ioctl argument type */
654656 struct drm_get_cap {
....@@ -696,13 +698,6 @@
696698 */
697699 #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
698700
699
-/*
700
- * DRM_CLIENT_CAP_SHARE_PLANES
701
- *
702
- * this is only used to compatibility with old hwc code.
703
- */
704
-#define DRM_CLIENT_CAP_SHARE_PLANES 6
705
-
706701 /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
707702 struct drm_set_client_cap {
708703 __u64 capability;
....@@ -742,8 +737,18 @@
742737 __u32 pad;
743738 };
744739
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
+
745749 #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
746750 #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 */
747752 struct drm_syncobj_wait {
748753 __u64 handles;
749754 /* absolute timeout */
....@@ -754,11 +759,33 @@
754759 __u32 pad;
755760 };
756761
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
+
757775 struct drm_syncobj_array {
758776 __u64 handles;
759777 __u32 count_handles;
760778 __u32 pad;
761779 };
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
+
762789
763790 /* Query current scanout sequence number */
764791 struct drm_crtc_get_sequence {
....@@ -916,6 +943,13 @@
916943 #define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease)
917944 #define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease)
918945
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
+
919953 /**
920954 * Device specific ioctls should only be in their respective headers
921955 * The device specific ioctl range is from 0x40 to 0x9f.