Allow disabling atomic modeset with LIBKMSXX_DISABLE_ATOMIC
authorTomi Valkeinen <tomi.valkeinen@iki.fi>
Wed, 30 Sep 2015 14:49:37 +0000 (17:49 +0300)
committerTomi Valkeinen <tomi.valkeinen@iki.fi>
Thu, 1 Oct 2015 16:40:22 +0000 (19:40 +0300)
libkms++/card.cpp

index 7fb910fda38956bf437527ece402252654836cf7..d652093b3b109b654373da24e986145cd27fd615 100644 (file)
@@ -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_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);
 
        uint64_t has_dumb;
        r = drmGetCap(fd, DRM_CAP_DUMB_BUFFER, &has_dumb);