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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -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) |