[PATCH] tests/chamelium/kms_chamelium_color: force connector reprobe after plugging ports

Kunal Joshi kunal1.joshi at intel.com
Wed Jan 15 15:15:07 UTC 2025


Force reprobe connector status after plugging to assure
we always have DRM_MODE_CONNECTED status for the connector
before proceding with the test.

Fixes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2371
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
 tests/chamelium/kms_chamelium_color.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/chamelium/kms_chamelium_color.c b/tests/chamelium/kms_chamelium_color.c
index 5550cec22..7c88c022c 100644
--- a/tests/chamelium/kms_chamelium_color.c
+++ b/tests/chamelium/kms_chamelium_color.c
@@ -749,8 +749,13 @@ igt_main
 		 * discovered ports, just incase they are not plugged
 		 * we currently skip in test_setup
 		 */
-		for( i = 0; i < data.port_count; i++)
+		for (i = 0; i < data.port_count; i++) {
 			chamelium_plug(data.chamelium, data.ports[i]);
+			igt_assert_f(chamelium_reprobe_connector(&data.display,
+								 data.chamelium,
+								 data.ports[i]) == DRM_MODE_CONNECTED,
+								 "Output not connected\n");
+		}
 
 		kmstest_set_vt_graphics_mode();
 	}
-- 
2.25.1



More information about the igt-dev mailing list