From: Kunal Joshi <kunal1.joshi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>,
Arun R Murthy <arun.r.murthy@intel.com>
Subject: [PATCH i-g-t 5/6] tests/kms_feature_discovery: add basic usb4 switch discovery
Date: Thu, 9 Apr 2026 10:07:13 +0530 [thread overview]
Message-ID: <20260409043714.284108-6-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20260409043714.284108-1-kunal1.joshi@intel.com>
Add a 'usb4-switch' subtest that verifies the Microsoft USB4 Switch
3141 is reachable. The test initializes the switch library and queries
the active port to confirm communication works.
This enables CI to detect when USB4 switch hardware is available
before running the full kms_usb4_switch test suite.
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
---
tests/kms_feature_discovery.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/tests/kms_feature_discovery.c b/tests/kms_feature_discovery.c
index 28ec89c55..abb9bad97 100644
--- a/tests/kms_feature_discovery.c
+++ b/tests/kms_feature_discovery.c
@@ -40,6 +40,7 @@
#include "igt_psr.h"
#include "igt_sysfs.h"
#include "igt_types.h"
+#include "igt_usb4_switch.h"
/**
* SUBTEST: display
@@ -63,6 +64,9 @@
* SUBTEST: dp-mst
* Description: Make sure that we have DP-MST configuration.
*
+ * SUBTEST: usb4-switch
+ * Description: Verify that USB4 Switch 3141 is available and responding.
+ *
* arg[1].values: 1, 2, 3, 4
*/
@@ -147,6 +151,25 @@ int igt_main() {
}
#endif
+ igt_describe("Verify that USB4 Switch 3141 is available and responding.");
+ igt_subtest("usb4-switch") {
+ struct usb4switch *sw;
+ int port;
+
+ sw = usb4switch_init(fd);
+ igt_require_f(sw,
+ "USB4 Switch 3141 not available\n");
+
+ /* Verify communication works by querying active port */
+ port = usb4switch_get_active_port(sw);
+ igt_assert_f(port >= 0,
+ "Cannot communicate with USB4 switch\n");
+
+ igt_info("USB4 Switch 3141 available (active port: %d)\n",
+ port);
+ usb4switch_deinit(sw);
+ }
+
igt_describe("Make sure that we have eDP panel with PSR1 support.");
igt_subtest("psr1") {
igt_require(psr_sink_support(fd, debugfs_fd, PSR_MODE_1, NULL));
--
2.25.1
next prev parent reply other threads:[~2026-04-09 4:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 4:37 [PATCH i-g-t 0/6] add test to validate dock/undock and switch Kunal Joshi
2026-04-09 4:37 ` [PATCH i-g-t 1/6] lib/igt_edid: add EDID serial extraction helpers Kunal Joshi
2026-04-09 4:37 ` [PATCH i-g-t 2/6] lib/igt_connector_helper: Add generic connector helpers Kunal Joshi
2026-04-09 4:37 ` [PATCH i-g-t 3/6] lib/igt_serial: add generic serial communication helper Kunal Joshi
2026-04-09 4:37 ` [PATCH i-g-t 4/6] lib/igt_usb4_switch: add helper library for USB4 Switch 3141 Kunal Joshi
2026-04-09 4:37 ` Kunal Joshi [this message]
2026-04-09 4:37 ` [PATCH i-g-t 6/6] tests/intel/kms_usb4_switch: Add USB4 switch test suite Kunal Joshi
2026-04-10 0:18 ` ✓ i915.CI.BAT: success for add test to validate dock/undock and switch (rev4) Patchwork
2026-04-10 0:19 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-10 2:45 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-10 17:16 ` ✗ i915.CI.Full: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-02-25 21:28 [PATCH i-g-t 0/6] add test to validate dock/undock and switch Kunal Joshi
2026-02-25 21:28 ` [PATCH i-g-t 5/6] tests/kms_feature_discovery: add basic usb4 switch discovery Kunal Joshi
2026-02-25 19:42 [PATCH i-g-t 0/6] add test to validate dock/undock and switch Kunal Joshi
2026-02-25 19:42 ` [PATCH i-g-t 5/6] tests/kms_feature_discovery: add basic usb4 switch discovery Kunal Joshi
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=20260409043714.284108-6-kunal1.joshi@intel.com \
--to=kunal1.joshi@intel.com \
--cc=arun.r.murthy@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