From f4f5e930412a007b9f862024cccede416da8b2d9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 19 Jun 2019 03:09:09 +0300 Subject: kmstest.py: Add output_connectors() helper to skip writeback connectors Add a generator method to the KMSTest class to enumerate all non-writeback connectors, and use it through tests. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- tests/kms-test-routing.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/kms-test-routing.py') diff --git a/tests/kms-test-routing.py b/tests/kms-test-routing.py index 2cf02dd..a24dc1c 100755 --- a/tests/kms-test-routing.py +++ b/tests/kms-test-routing.py @@ -23,10 +23,7 @@ class RoutingTest(kmstest.KMSTest): max_hdisplay = 0 max_vdisplay = 0 - for connector in self.card.connectors: - if connector.fullname.startswith('writeback-'): - continue - + for connector in self.output_connectors(): mode = connector.get_default_mode() max_hdisplay = max(mode.hdisplay, max_hdisplay) max_vdisplay = max(mode.vdisplay, max_vdisplay) @@ -39,10 +36,7 @@ class RoutingTest(kmstest.KMSTest): # Find a connector that can be routed to at least two CRTCs that have # at least two output routes each. shared_connector = None - for connector in self.card.connectors: - if connector.fullname.startswith('writeback-'): - continue - + for connector in self.output_connectors(): pipes = [] for crtc in connector.get_possible_crtcs(): if len(self.crtc_to_connectors[crtc]) >= 2: -- cgit v1.2.3