History

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.

Ville Syrjälä committed 10 years ago

Commit 91d5ee01 parent e5878031 file · +9 −1Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/drm/drm_mode.h+9−1
@@ -47,7 +47,15 @@ extern "C" { · 46 unmodified lines
47#define DRM_MODE_TYPE_DRIVER (1<<6)47#define DRM_MODE_TYPE_DRIVER (1<<6)
48 48
49/* Video mode flags */49/* 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 */
51#define DRM_MODE_FLAG_PHSYNC (1<<0)59#define DRM_MODE_FLAG_PHSYNC (1<<0)
52#define DRM_MODE_FLAG_NHSYNC (1<<1)60#define DRM_MODE_FLAG_NHSYNC (1<<1)
53#define DRM_MODE_FLAG_PVSYNC (1<<2)61#define DRM_MODE_FLAG_PVSYNC (1<<2)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t