aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <[email protected]>2016-11-03 16:10:01 +0200
committerDaniel Vetter <[email protected]>2016-11-08 11:10:45 +0100
commit91d5ee0451607d2a33c2b811ef3cc4a3e4578ed8 (patch)
treed8812578a725bdb290a73cbfc2b5b7f390fa5416
parente587803c0a0f6bc6e1a9c4761310f96f7bc49acb (diff)
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]
-rw-r--r--include/uapi/drm/drm_mode.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 084b50a02dc5..01000c9f7c2c 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -47,7 +47,15 @@ extern "C" {
#define DRM_MODE_TYPE_DRIVER (1<<6)
/* Video mode flags */
-/* bit compatible with the xorg definitions. */
+/* bit compatible with the xrandr RR_ definitions (bits 0-13)
+ *
+ * ABI warning: Existing userspace really expects
+ * the mode flags to match the xrandr definitions. Any
+ * changes that don't match the xrandr definitions will
+ * likely need a new client cap or some other mechanism
+ * to avoid breaking existing userspace. This includes
+ * allocating new flags in the previously unused bits!
+ */
#define DRM_MODE_FLAG_PHSYNC (1<<0)
#define DRM_MODE_FLAG_NHSYNC (1<<1)
#define DRM_MODE_FLAG_PVSYNC (1<<2)