From: Kunal Joshi <kunal1.joshi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>
Subject: [igt-dev] [PATCH i-g-t 2/3] lib/igt_chamelium: Added is_mapped to track mapped ports
Date: Thu, 13 Jul 2023 14:47:25 +0530 [thread overview]
Message-ID: <20230713091726.272816-3-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20230713091726.272816-1-kunal1.joshi@intel.com>
Added boolean is_mapped, which is true for mapped ports
and only plug mapped ports
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
lib/igt_chamelium.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 95983ff25..a737330a6 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -99,6 +99,7 @@ struct chamelium_port {
char *name;
bool adapter_allowed;
char *connector_path;
+ bool is_mapped;
};
struct chamelium_frame_dump {
@@ -2721,6 +2722,7 @@ static bool chamelium_autodiscover(struct chamelium *chamelium)
igt_info("Failed to auto-discover port %d\n", port_id);
goto unplug_port;
}
+ port->is_mapped = true;
is_any_port_mapped = true;
/* If we found a connector for our port, increment the number of valid Chamelium ports. */
@@ -2746,9 +2748,10 @@ unplug_port:
}
/* After we're all set, turn on all supported ports */
- for (i = 0; i < chamelium->port_count; i++) {
+ for (i = 0; i < CHAMELIUM_MAX_PORTS; i++) {
struct chamelium_port *port = &chamelium->ports[i];
- chamelium_plug(chamelium, port);
+ if (port->is_mapped)
+ chamelium_plug(chamelium, port);
}
sleep(CHAMELIUM_HOTPLUG_DETECTION_DELAY);
--
2.25.1
next prev parent reply other threads:[~2023-07-13 9:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 9:17 [igt-dev] [PATCH i-g-t 0/3] Fix autodiscovery in chamelium Kunal Joshi
2023-07-13 9:17 ` [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: reset chamelium before starting autodiscovery Kunal Joshi
2023-07-14 6:15 ` B, Jeevan
2023-07-13 9:17 ` Kunal Joshi [this message]
2023-07-14 6:19 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_chamelium: Added is_mapped to track mapped ports B, Jeevan
2023-07-13 9:17 ` [igt-dev] [PATCH i-g-t 3/3] lib/igt_chamelium: Added function to sort chamelium ports based on is_mapped Kunal Joshi
2023-07-14 6:27 ` B, Jeevan
2023-07-13 10:26 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix autodiscovery in chamelium Patchwork
2023-07-13 12:05 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-13 13:25 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-18 5:41 ` [igt-dev] ○ CI.xeBAT: info for Fix autodiscovery in chamelium (rev2) Patchwork
2023-07-18 5:57 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-07-18 8:19 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230713091726.272816-3-kunal1.joshi@intel.com \
--to=kunal1.joshi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox