From 1637053ef858f595a4a2e2824d2e198821d61a39 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 3 May 2018 14:05:47 +0200 Subject: drm: only disable atomic modesetting when WLR_DRM_NO_ATOMIC == 1 Don't allow any value of the env var to disable atomic mode setting. --- backend/drm/drm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend/drm') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index dc512151..7ace90dc 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -32,7 +32,8 @@ bool check_drm_features(struct wlr_drm_backend *drm) { return false; } - if (getenv("WLR_DRM_NO_ATOMIC")) { + const char *no_atomic = getenv("WLR_DRM_NO_ATOMIC"); + if (no_atomic && strcmp(no_atomic, "1") == 0) { wlr_log(L_DEBUG, "WLR_DRM_NO_ATOMIC set, forcing legacy DRM interface"); drm->iface = &legacy_iface; } else if (drmSetClientCap(drm->fd, DRM_CLIENT_CAP_ATOMIC, 1)) { -- cgit v1.2.3