Skip to content

Commit 91d5ee0

Browse files
vsyrjaladanvet
authored andcommitted
drm/uapi: Add a warning that mode flags must match the xrandr definitions
Existing userspace expected the mode flags to match the xrandr definitions 1:1, and even adding new flags in he previously unused bits is likely to break existing userspace. Add a comment warning people about this potential trap. Cc: Shashank Sharma <[email protected]> Cc: "Lin, Jia" <[email protected]> Cc: Akashdeep Sharma <[email protected]> Cc: Jim Bride <[email protected]> Cc: Jose Abreu <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Emil Velikov <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e587803 commit 91d5ee0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

include/uapi/drm/drm_mode.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ extern "C" {
4747
#define DRM_MODE_TYPE_DRIVER (1<<6)
4848

4949
/* Video mode flags */
50-
/* bit compatible with the xorg definitions. */
50+
/* bit compatible with the xrandr RR_ definitions (bits 0-13)
51+
*
52+
* ABI warning: Existing userspace really expects
53+
* the mode flags to match the xrandr definitions. Any
54+
* changes that don't match the xrandr definitions will
55+
* likely need a new client cap or some other mechanism
56+
* to avoid breaking existing userspace. This includes
57+
* allocating new flags in the previously unused bits!
58+
*/
5159
#define DRM_MODE_FLAG_PHSYNC (1<<0)
5260
#define DRM_MODE_FLAG_NHSYNC (1<<1)
5361
#define DRM_MODE_FLAG_PVSYNC (1<<2)

0 commit comments

Comments
 (0)