From 1116fb3ba4531934980c3354ddadd50d2d151b1c 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++util/src/resourcemanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kms++util/src') diff --git a/kms++util/src/resourcemanager.cpp b/kms++util/src/resourcemanager.cpp index 424c8f0..75b0766 100644 --- a/kms++util/src/resourcemanager.cpp +++ b/kms++util/src/resourcemanager.cpp @@ -2,6 +2,8 @@ #include #include +#include + using namespace kms; using namespace std; @@ -20,6 +22,9 @@ void ResourceManager::reset() static Connector* find_connector(Card& card, const set& reserved) { for (Connector* conn : card.get_connectors()) { + if (conn->connector_type() == DRM_MODE_CONNECTOR_WRITEBACK) + continue; + if (!conn->connected()) continue; -- cgit v1.2.3