From 70ed259ba057e629ad22ac93168a438dbd93113f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 17 Jun 2019 02:31:28 +0300 Subject: card: Add support for writeback connectors Enable enumeration of writeback connectors if both libdrm and the device support it. The new Card::has_writeback() method report if the card support writeback connectors. Existing code that expect all connectors to model an output may be confused by the sudden availability of new connectors. To handle this issue, - add a KMSXX_DISABLE_WRITEBACK_CONNECTORS environment variable to disable enumeration of writeback connectors, similarly to universal planes ; and - ignore writeback connectors where no specific connector is requested (Card::get_first_connected_connector(), ResourceManager::reserve_connector() if no connector name is specified, and applications that use all connected outputs). Signed-off-by: Laurent Pinchart --- kms++/inc/kms++/card.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kms++/inc/kms++/card.h') diff --git a/kms++/inc/kms++/card.h b/kms++/inc/kms++/card.h index bf6f9bf..fc11e92 100644 --- a/kms++/inc/kms++/card.h +++ b/kms++/inc/kms++/card.h @@ -54,6 +54,7 @@ public: bool has_universal_planes() const { return m_has_universal_planes; } bool has_dumb_buffers() const { return m_has_dumb; } bool has_kms() const; + bool has_writeback() const { return m_has_writeback; } std::vector get_connectors() const { return m_connectors; } std::vector get_encoders() const { return m_encoders; } @@ -92,6 +93,7 @@ private: bool m_has_atomic; bool m_has_universal_planes; bool m_has_dumb; + bool m_has_writeback; CardVersion m_version; }; -- cgit v1.2.3