diff options
-rw-r--r-- | kms++/inc/kms++/card.h | 2 | ||||
-rw-r--r-- | kms++/src/card.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/kms++/inc/kms++/card.h b/kms++/inc/kms++/card.h index b96e1c1..72111f1 100644 --- a/kms++/inc/kms++/card.h +++ b/kms++/inc/kms++/card.h @@ -37,6 +37,7 @@ public: bool is_master() const { return m_is_master; } bool has_atomic() const { return m_has_atomic; } bool has_has_universal_planes() const { return m_has_universal_planes; } + bool has_dumb_buffers() const { return m_has_dumb; } const std::vector<Connector*> get_connectors() const { return m_connectors; } const std::vector<Encoder*> get_encoders() const { return m_encoders; } @@ -72,6 +73,7 @@ private: bool m_has_atomic; bool m_has_universal_planes; + bool m_has_dumb; int m_version_major; int m_version_minor; diff --git a/kms++/src/card.cpp b/kms++/src/card.cpp index 3b3e2c1..4632f22 100644 --- a/kms++/src/card.cpp +++ b/kms++/src/card.cpp @@ -143,8 +143,7 @@ void Card::setup() uint64_t has_dumb; r = drmGetCap(m_fd, DRM_CAP_DUMB_BUFFER, &has_dumb); - if (r || !has_dumb) - throw invalid_argument("Dumb buffers not available"); + m_has_dumb = r == 0 && has_dumb; auto res = drmModeGetResources(m_fd); if (res) { |