diff options
Diffstat (limited to 'tools/include/uapi/drm/drm.h')
-rw-r--r-- | tools/include/uapi/drm/drm.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/include/uapi/drm/drm.h b/tools/include/uapi/drm/drm.h index 97677cd6964d..6fdff5945c8a 100644 --- a/tools/include/uapi/drm/drm.h +++ b/tools/include/uapi/drm/drm.h | |||
@@ -737,6 +737,28 @@ struct drm_syncobj_array { | |||
737 | __u32 pad; | 737 | __u32 pad; |
738 | }; | 738 | }; |
739 | 739 | ||
740 | /* Query current scanout sequence number */ | ||
741 | struct drm_crtc_get_sequence { | ||
742 | __u32 crtc_id; /* requested crtc_id */ | ||
743 | __u32 active; /* return: crtc output is active */ | ||
744 | __u64 sequence; /* return: most recent vblank sequence */ | ||
745 | __s64 sequence_ns; /* return: most recent time of first pixel out */ | ||
746 | }; | ||
747 | |||
748 | /* Queue event to be delivered at specified sequence. Time stamp marks | ||
749 | * when the first pixel of the refresh cycle leaves the display engine | ||
750 | * for the display | ||
751 | */ | ||
752 | #define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */ | ||
753 | #define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */ | ||
754 | |||
755 | struct drm_crtc_queue_sequence { | ||
756 | __u32 crtc_id; | ||
757 | __u32 flags; | ||
758 | __u64 sequence; /* on input, target sequence. on output, actual sequence */ | ||
759 | __u64 user_data; /* user data passed to event */ | ||
760 | }; | ||
761 | |||
740 | #if defined(__cplusplus) | 762 | #if defined(__cplusplus) |
741 | } | 763 | } |
742 | #endif | 764 | #endif |
@@ -819,6 +841,9 @@ extern "C" { | |||
819 | 841 | ||
820 | #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) | 842 | #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) |
821 | 843 | ||
844 | #define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) | ||
845 | #define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) | ||
846 | |||
822 | #define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) | 847 | #define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) |
823 | 848 | ||
824 | #define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) | 849 | #define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) |
@@ -863,6 +888,11 @@ extern "C" { | |||
863 | #define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) | 888 | #define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) |
864 | #define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) | 889 | #define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) |
865 | 890 | ||
891 | #define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) | ||
892 | #define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) | ||
893 | #define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) | ||
894 | #define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) | ||
895 | |||
866 | /** | 896 | /** |
867 | * Device specific ioctls should only be in their respective headers | 897 | * Device specific ioctls should only be in their respective headers |
868 | * The device specific ioctl range is from 0x40 to 0x9f. | 898 | * The device specific ioctl range is from 0x40 to 0x9f. |
@@ -893,6 +923,7 @@ struct drm_event { | |||
893 | 923 | ||
894 | #define DRM_EVENT_VBLANK 0x01 | 924 | #define DRM_EVENT_VBLANK 0x01 |
895 | #define DRM_EVENT_FLIP_COMPLETE 0x02 | 925 | #define DRM_EVENT_FLIP_COMPLETE 0x02 |
926 | #define DRM_EVENT_CRTC_SEQUENCE 0x03 | ||
896 | 927 | ||
897 | struct drm_event_vblank { | 928 | struct drm_event_vblank { |
898 | struct drm_event base; | 929 | struct drm_event base; |
@@ -903,6 +934,16 @@ struct drm_event_vblank { | |||
903 | __u32 crtc_id; /* 0 on older kernels that do not support this */ | 934 | __u32 crtc_id; /* 0 on older kernels that do not support this */ |
904 | }; | 935 | }; |
905 | 936 | ||
937 | /* Event delivered at sequence. Time stamp marks when the first pixel | ||
938 | * of the refresh cycle leaves the display engine for the display | ||
939 | */ | ||
940 | struct drm_event_crtc_sequence { | ||
941 | struct drm_event base; | ||
942 | __u64 user_data; | ||
943 | __s64 time_ns; | ||
944 | __u64 sequence; | ||
945 | }; | ||
946 | |||
906 | /* typedef area */ | 947 | /* typedef area */ |
907 | #ifndef __KERNEL__ | 948 | #ifndef __KERNEL__ |
908 | typedef struct drm_clip_rect drm_clip_rect_t; | 949 | typedef struct drm_clip_rect drm_clip_rect_t; |