From: Kunal Joshi <kunal1.joshi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>,
Mohammed Thasleem <mohammed.thasleem@intel.com>
Subject: [PATCH i-g-t 2/6] tests/intel/kms_mst_helper: Add helper to check for MST outputs
Date: Wed, 1 Apr 2026 17:25:38 +0530 [thread overview]
Message-ID: <20260401115542.1074290-3-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20260401115542.1074290-1-kunal1.joshi@intel.com>
Add igt_display_has_mst_output() to check
if a display has at least one DP MST output
connected. This is useful for tests that need
to verify MST output availability before running.
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
Reviewed-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
tests/intel/kms_mst_helper.c | 19 +++++++++++++++++++
tests/intel/kms_mst_helper.h | 1 +
2 files changed, 20 insertions(+)
diff --git a/tests/intel/kms_mst_helper.c b/tests/intel/kms_mst_helper.c
index 38859cffc..1918c8d10 100644
--- a/tests/intel/kms_mst_helper.c
+++ b/tests/intel/kms_mst_helper.c
@@ -47,3 +47,22 @@ int igt_find_all_mst_output_in_topology(int drm_fd, igt_display_t *display,
}
return 0;
}
+
+/**
+ * igt_display_has_mst_output:
+ * @display: pointer to #igt_display_t structure
+ *
+ * Check if a display has at least one DP MST output connected.
+ *
+ * Returns: true if MST output is found, false otherwise
+ */
+bool igt_display_has_mst_output(igt_display_t *display)
+{
+ igt_output_t *output;
+
+ for_each_connected_output(display, output) {
+ if (igt_check_output_is_dp_mst(output))
+ return true;
+ }
+ return false;
+}
diff --git a/tests/intel/kms_mst_helper.h b/tests/intel/kms_mst_helper.h
index 7391494ab..0e8ece0a0 100644
--- a/tests/intel/kms_mst_helper.h
+++ b/tests/intel/kms_mst_helper.h
@@ -12,4 +12,5 @@ int igt_find_all_mst_output_in_topology(int drm_fd, igt_display_t *display,
igt_output_t *output,
igt_output_t *mst_outputs[],
int *num_mst_outputs);
+bool igt_display_has_mst_output(igt_display_t *display);
#endif
--
2.48.1
next prev parent reply other threads:[~2026-04-01 11:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 11:55 [PATCH i-g-t 0/6] tests/kms_pipe_crc_basic: add mst suspend-resume test Kunal Joshi
2026-04-01 11:55 ` [PATCH i-g-t 1/6] tests/intel/kms_mst_helper: Add kernel-doc for existing function Kunal Joshi
2026-04-01 11:55 ` Kunal Joshi [this message]
2026-04-01 11:55 ` [PATCH i-g-t 3/6] lib/igt_kms: Fix max_non_joiner_mode_found Kunal Joshi
2026-04-01 11:44 ` Jani Nikula
2026-04-01 11:57 ` Joshi, Kunal1
2026-04-01 11:55 ` [PATCH i-g-t 4/6] lib/igt_kms: Export get_max_pipe_hdisplay as public helper Kunal Joshi
2026-04-01 11:47 ` Jani Nikula
2026-04-01 14:46 ` Joshi, Kunal1
2026-04-01 11:55 ` [PATCH i-g-t 5/6] tests/intel/kms_joiner: Require boundary mode for basic-max-non-joiner Kunal Joshi
2026-04-01 11:55 ` [PATCH i-g-t 6/6] tests/kms_pipe_crc_basic: Add MST suspend-resume test Kunal Joshi
2026-04-01 11:52 ` Jani Nikula
2026-04-01 11:59 ` Joshi, Kunal1
2026-04-01 12:06 ` Ville Syrjälä
2026-04-01 12:17 ` Joshi, Kunal1
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=20260401115542.1074290-3-kunal1.joshi@intel.com \
--to=kunal1.joshi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mohammed.thasleem@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