Merge pull request #945 from agx/wlr-drm-no-atomic

drm: only disable atomic modesetting when WLR_DRM_NO_ATOMIC == 1
This commit is contained in:
emersion 2018-05-03 20:52:02 +01:00 committed by GitHub
commit 96d166ed53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)) {