drm: Deprecate non-atomic mode sets

We've been keeping these poorly tested paths around long enough, it's time
to deprecate them, to be dropped after the next major release.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2026-04-27 15:46:26 -05:00
parent e0c5b8a26b
commit 34403d1f4f
3 changed files with 19 additions and 0 deletions

View file

@ -2069,6 +2069,15 @@ init_kms_caps(struct drm_device *device)
weston_log("DRM: %s atomic modesetting\n",
device->atomic_modeset ? "supports" : "does not support");
if (!device->atomic_modeset) {
#ifdef ALLOW_DEPRECATED_MODESET
weston_log("DRM Warning: Non-atomic modeset support is deprecated and will be removed.\n");
#else
weston_log("Error: Kernel DRM KMS does not support DRM_CLIENT_CAP_ATOMIC.\n");
return -1;
#endif
}
if (!getenv("WESTON_DISABLE_GBM_MODIFIERS")) {
ret = drmGetCap(device->kms_device->fd, DRM_CAP_ADDFB2_MODIFIERS, &cap);
if (ret == 0)

View file

@ -221,6 +221,9 @@ else
prog_glslang = find_program('', required : false)
endif
if get_option('allow-deprecated-modeset')
config_h.set('ALLOW_DEPRECATED_MODESET', '1')
endif
subdir('include')
subdir('protocol')

View file

@ -209,3 +209,10 @@ option(
value : false,
description : 'Enable performance analysis with Perfetto.'
)
option(
'allow-deprecated-modeset',
type: 'boolean',
value: false,
description: 'DEPRECATED: Non-atomic modeset paths will be removed'
)