Add a test environment variable to allow disabling atomic modesetting.
Signed-off-by: Daniel Stone <[email protected]>
---
libweston/compositor-drm.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index d04ba12f..8cd69f1f 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3240,11 +3240,13 @@ init_kms_caps(struct drm_backend *b)
b->universal_planes ? "supports" : "does not support");
#ifdef HAVE_DRM_ATOMIC
- ret = drmGetCap(b->drm.fd, DRM_CAP_CRTC_IN_VBLANK_EVENT, &cap);
- if (ret != 0)
- cap = 0;
- ret = drmSetClientCap(b->drm.fd, DRM_CLIENT_CAP_ATOMIC, 1);
- b->atomic_modeset = ((ret == 0) && (cap == 1));
+ if (!getenv("DRM_DISABLE_ATOMIC")) {
+ ret = drmGetCap(b->drm.fd, DRM_CAP_CRTC_IN_VBLANK_EVENT, &cap);
+ if (ret != 0)
+ cap = 0;
+ ret = drmSetClientCap(b->drm.fd, DRM_CLIENT_CAP_ATOMIC, 1);
+ b->atomic_modeset = ((ret == 0) && (cap == 1));
+ {
#endif
weston_log("DRM: %s atomic modesetting\n",
b->atomic_modeset ? "supports" : "does not support");
--
2.14.1
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel