public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Kunal Joshi <kunal1.joshi@intel.com>, igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>,
	Arun R Murthy <arun.r.murthy@intel.com>
Subject: Re: [PATCH i-g-t 5/6] tests/kms_feature_discovery: add basic usb4 switch discovery
Date: Tue, 14 Apr 2026 12:23:03 +0300	[thread overview]
Message-ID: <fb0186beeb70b5c485d4e726b584a2403e73b76c@intel.com> (raw)
In-Reply-To: <20260409043714.284108-6-kunal1.joshi@intel.com>

On Thu, 09 Apr 2026, Kunal Joshi <kunal1.joshi@intel.com> wrote:
> 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.

How long is this going to take when the device is *not* there, i.e. most
cases in CI?

BR,
Jani.

>
> 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));

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-04-14  9:23 UTC|newest]

Thread overview: 18+ 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-14  9:11   ` Jani Nikula
2026-04-14  9:55     ` Simon Ser
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-14  9:20   ` Jani Nikula
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 ` [PATCH i-g-t 5/6] tests/kms_feature_discovery: add basic usb4 switch discovery Kunal Joshi
2026-04-14  9:23   ` Jani Nikula [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-14  9:27   ` Jani Nikula
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=fb0186beeb70b5c485d4e726b584a2403e73b76c@intel.com \
    --to=jani.nikula@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kunal1.joshi@intel.com \
    /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