Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools headers uapi: Synchronize drm/drm.h

To pick up the new ioctls added in these csets:

3064abfa932b ("drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3]")
62884cd386b8 ("drm: Add four ioctls for managing drm mode object leases [v7]")

That will be automatically decoded (the ioctl cmd parameter, the structs
will be supported when we start using eBPF for that, which is in the
works).

This silences this warning when building tools/perf:

Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h'

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Keith Packard <keithp@keithp.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-bivwf1pkfmi1ugpswbsxd9e9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+41
+41
tools/include/uapi/drm/drm.h
··· 737 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 762 #if defined(__cplusplus) 741 763 } 742 764 #endif ··· 841 819 842 820 #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) 843 821 822 + #define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) 823 + #define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) 824 + 844 825 #define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) 845 826 846 827 #define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) ··· 888 863 #define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) 889 864 #define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) 890 865 866 + #define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) 867 + #define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) 868 + #define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) 869 + #define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) 870 + 891 871 /** 892 872 * Device specific ioctls should only be in their respective headers 893 873 * The device specific ioctl range is from 0x40 to 0x9f. ··· 923 893 924 894 #define DRM_EVENT_VBLANK 0x01 925 895 #define DRM_EVENT_FLIP_COMPLETE 0x02 896 + #define DRM_EVENT_CRTC_SEQUENCE 0x03 926 897 927 898 struct drm_event_vblank { 928 899 struct drm_event base; ··· 932 901 __u32 tv_usec; 933 902 __u32 sequence; 934 903 __u32 crtc_id; /* 0 on older kernels that do not support this */ 904 + }; 905 + 906 + /* Event delivered at sequence. Time stamp marks when the first pixel 907 + * of the refresh cycle leaves the display engine for the display 908 + */ 909 + struct drm_event_crtc_sequence { 910 + struct drm_event base; 911 + __u64 user_data; 912 + __s64 time_ns; 913 + __u64 sequence; 935 914 }; 936 915 937 916 /* typedef area */