From 36f42004d8f084775efd92a559996ecaeefb0cda Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 15 May 2020 11:08:03 +0300 Subject: kmstest: allow enabling output without anything connected Allow kmstest to enable an output without anything connected, if the user gives a videomode. DRM framework allows this, and is needed for testing. Signed-off-by: Tomi Valkeinen --- utils/kmstest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'utils/kmstest.cpp') diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp index b6092cb..b4bf24b 100644 --- a/utils/kmstest.cpp +++ b/utils/kmstest.cpp @@ -88,9 +88,6 @@ static void get_connector(ResourceManager& resman, OutputInfo& output, const str if (!conn) EXIT("No connector '%s'", str.c_str()); - if (!conn->connected()) - EXIT("Connector '%s' not connected", conn->fullname().c_str()); - output.connector = conn; output.mode = output.connector->get_default_mode(); } @@ -646,7 +643,7 @@ static vector setups_to_outputs(Card& card, ResourceManager& resman, if (outputs.empty()) { // no outputs defined, show a pattern on all connected screens for (Connector* conn : card.get_connectors()) { - if (conn->connector_status() != ConnectorStatus::Connected) + if (!conn->connected()) continue; OutputInfo output = { }; @@ -668,6 +665,9 @@ static vector setups_to_outputs(Card& card, ResourceManager& resman, get_props(card, o.crtc_props, o.crtc); + if (!o.mode.valid()) + EXIT("Mode not valid for %s", o.connector->fullname().c_str()); + if (card.has_atomic()) { if (o.planes.empty()) add_default_planeinfo(&o); -- cgit v1.2.3