[PATCH i-g-t 3/3] tests/chamelium/kms_chamelium_color: prefer HDMI port for color tests to avoid DP FSM failures

Kunal Joshi kunal1.joshi at intel.com
Tue Jun 25 14:06:05 UTC 2024


Both DP and HDMI connectors are fine to capture, just we are more
stable on HDMI and sometimes face DP FSM failures, for color tests
prefer HDMI if its present, else use DP

Cc: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
 tests/chamelium/kms_chamelium_color.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/chamelium/kms_chamelium_color.c b/tests/chamelium/kms_chamelium_color.c
index 392eaf1f4..5550cec22 100644
--- a/tests/chamelium/kms_chamelium_color.c
+++ b/tests/chamelium/kms_chamelium_color.c
@@ -468,6 +468,19 @@ static int test_setup(data_t *data, enum pipe p)
 
 	data->primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
 
+	/*
+	 * Prefer to run this test on HDMI connector if its connected, since on DP we
+	 * sometimes face DP FSM issue
+	 */
+        for_each_valid_output_on_pipe(&data->display, p, data->output) {
+                for (i = 0; i < data->port_count; i++) {
+                        if ((data->output->config.connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+			    data->output->config.connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) &&
+			    strcmp(data->output->name, chamelium_port_get_name(data->ports[i])) == 0)
+                                return i;
+                }
+        }
+
 	for_each_valid_output_on_pipe(&data->display, p, data->output) {
 		for (i = 0; i < data->port_count; i++) {
 			if (strcmp(data->output->name,
-- 
2.25.1



More information about the igt-dev mailing list