From 50182e47bdcca178e91778e508a512aa2e2ea4cf Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 30 Sep 2015 17:49:37 +0300 Subject: Allow disabling atomic modeset with LIBKMSXX_DISABLE_ATOMIC --- libkms++/card.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libkms++/card.cpp b/libkms++/card.cpp index 7fb910f..d652093 100644 --- a/libkms++/card.cpp +++ b/libkms++/card.cpp @@ -38,8 +38,12 @@ Card::Card() r = drmSetClientCap(m_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1); m_has_universal_planes = r == 0; - r = drmSetClientCap(m_fd, DRM_CLIENT_CAP_ATOMIC, 1); - m_has_atomic = r == 0; + if (getenv("LIBKMSXX_DISABLE_ATOMIC") == 0) { + r = drmSetClientCap(m_fd, DRM_CLIENT_CAP_ATOMIC, 1); + m_has_atomic = r == 0; + } else { + m_has_atomic = false; + } uint64_t has_dumb; r = drmGetCap(fd, DRM_CAP_DUMB_BUFFER, &has_dumb); -- cgit v1.2.3