diff options
author | Tomi Valkeinen <tomi.valkeinen@iki.fi> | 2015-09-30 17:49:37 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@iki.fi> | 2015-10-01 19:40:22 +0300 |
commit | 50182e47bdcca178e91778e508a512aa2e2ea4cf (patch) | |
tree | c47c7212c70cfe4633e9ace844b4a0786f1aae48 | |
parent | ece9bc78c40b26e0ae43d64543f820789fecf40d (diff) |
Allow disabling atomic modeset with LIBKMSXX_DISABLE_ATOMIC
-rw-r--r-- | libkms++/card.cpp | 8 |
1 files 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); |