[igt-dev] [PATCH v2] Cv3 workaround: skip plug all at init

Mark Yacoub markyacoub at chromium.org
Fri Nov 18 16:35:45 UTC 2022


[Why]
Currently, Cv3 doesn't allow all ports to be plugged in at the same time
so chamelium_plug_all() always fails.

[How]
Check for the first Port ID as it's unique between V2 and V3, and skip
the plugging if it's V3.

Signed-off-by: Mark Yacoub <markyacoub at chromium.org>
---
 lib/igt_chamelium.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 68864bb8..79920de1 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -3019,6 +3019,17 @@ bool chamelium_plug_all(struct chamelium *chamelium)
 	if (port_count <= 0)
 		return false;
 
+	/*
+	 * A temporary workaround for Chamelium V3: Currently, Cv3 doesn't allow
+	 * all ports to be plugged in at the same time. Cv3 first port has an ID
+	 * of 0 while Cv2 has first port ID as 1.
+	 * TODO(markyacoub): Remove this workaround when V3 is fixed.
+	 */
+	if (port_ids[0] == 0) {
+		igt_debug("This should be Cv3. Skipping plugging all ports\n");
+		return true;
+	}
+
 	for (int i = 0; i < port_count; ++i) {
 		v = __chamelium_rpc(chamelium, NULL, "Plug", "(i)", port_ids[i]);
 
-- 
2.38.1.584.g0f3c55d4c2-goog



More information about the igt-dev mailing list