[igt-dev] [PATCH] Cv3 Workaround: Skip Plug all at init.
Mark Yacoub
markyacoub at chromium.org
Thu Nov 17 19:46:39 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..6c52ac3b 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -3015,10 +3015,19 @@ bool chamelium_plug_all(struct chamelium *chamelium)
int port_ids[CHAMELIUM_MAX_PORTS];
xmlrpc_value *v;
+ igt_debug("CHAMELIUM PLUG ALL\n");
+
port_count = chamelium_get_video_ports(chamelium, port_ids);
+ igt_debug("CHAMELIUM PLUG ALL: %zu ports\n", port_count);
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. */
+ if (port_ids[0] == 0)
+ return true;
+
for (int i = 0; i < port_count; ++i) {
v = __chamelium_rpc(chamelium, NULL, "Plug", "(i)", port_ids[i]);
@@ -3053,6 +3062,7 @@ bool chamelium_wait_all_configured_ports_connected(struct chamelium *chamelium,
for (int i = 0; group_list[i] != NULL; i++) {
char *map_name;
group = group_list[i];
+ igt_debug("Checking group %s", group);
if (!strstr(group, "Chamelium:"))
continue;
@@ -3060,6 +3070,7 @@ bool chamelium_wait_all_configured_ports_connected(struct chamelium *chamelium,
igt_assert(chamelium->port_count <= CHAMELIUM_MAX_PORTS);
map_name = group + (sizeof("Chamelium:") - 1);
+ igt_debug("Checking map %s", map_name);
for (int j = 0;
j < res->count_connectors;
--
2.38.1.584.g0f3c55d4c2-goog
More information about the igt-dev
mailing list