[PATCH 2/2] tests/amdgpu/amd_vrr_range: Skip on unsupported connector types

Alex Hung alex.hung at amd.com
Thu Mar 21 02:03:54 UTC 2024


edid_database includes a set of EDID but does not includes one with
connector type == DRM_MODE_CONNECTOR_WRITEBACK. With writeback connector
enabled, this will always fail even if writeback connector does not
support freesync. As a result, freesync tests is skipped when there is
no match in edid_database.

Signed-off-by: Alex Hung <alex.hung at amd.com>
---
 tests/amdgpu/amd_vrr_range.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/amdgpu/amd_vrr_range.c b/tests/amdgpu/amd_vrr_range.c
index a77895622..79db6f9c4 100644
--- a/tests/amdgpu/amd_vrr_range.c
+++ b/tests/amdgpu/amd_vrr_range.c
@@ -208,7 +208,6 @@ static int find_test_edid_index(uint32_t connector_type)
 		}
 	}
 
-	igt_assert_f(0, "should not reach here");
 	return -1;
 }
 
@@ -268,6 +267,8 @@ static void test_freesync_parsing_base(data_t *data, uint32_t test_flags)
 	for_each_connected_output(display, output) {
 		/* find a test EDID */
 		j = find_test_edid_index(output->config.connector->connector_type);
+		if (j == -1)
+			continue;
 
 		edid = (const struct edid *)edid_database[j].edid;
 		expected_range = edid_database[j].range;
-- 
2.34.1



More information about the igt-dev mailing list