From: Pranay Samala <pranay.samala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, sameer.lattannavar@intel.com,
pranay.samala@intel.com
Subject: [PATCH i-g-t 1/2] lib/igt_kms: Add helper to get non-joiner mode
Date: Mon, 23 Feb 2026 15:04:42 +0530 [thread overview]
Message-ID: <20260223093443.1797078-2-pranay.samala@intel.com> (raw)
In-Reply-To: <20260223093443.1797078-1-pranay.samala@intel.com>
Add igt_get_non_joiner_mode() helper function to find a suitable
display mode from an output that does not require Big Joiner or
Ultra Joiner support. This is useful for tests that want to avoid
joiner modes and use a single pipe configuration.
The function returns a pointer to the mode if found, or NULL if
all modes require joiner support.
Signed-off-by: Pranay Samala <pranay.samala@intel.com>
---
lib/igt_kms.c | 31 +++++++++++++++++++++++++++++++
lib/igt_kms.h | 1 +
2 files changed, 32 insertions(+)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5c4879604..107db512d 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6997,6 +6997,37 @@ bool ultrajoiner_mode_found(int drm_fd, drmModeConnector *connector,
return found;
}
+/**
+ * igt_get_non_joiner_mode:
+ * @drm_fd: drm file descriptor
+ * @output: pointer to the output structure
+ *
+ * Finds the display mode from the output that does not require
+ * Big Joiner or Ultra Joiner.
+ *
+ * Returns: Pointer to non-joiner mode, or NULL if not found.
+ */
+drmModeModeInfo *igt_get_non_joiner_mode(int drm_fd, igt_output_t *output)
+{
+ drmModeConnector *connector;
+ int max_dotclock;
+
+ connector = output->config.connector;
+ max_dotclock = igt_get_max_dotclock(drm_fd);
+
+ for (int i = 0; i < connector->count_modes; i++) {
+ drmModeModeInfo *current_mode = &connector->modes[i];
+
+ /* Check if mode requires joiner */
+ if (!igt_bigjoiner_possible(drm_fd, current_mode, max_dotclock) &&
+ !igt_ultrajoiner_possible(drm_fd, current_mode, max_dotclock)) {
+ return current_mode;
+ }
+ }
+
+ return NULL;
+}
+
/**
* is_joiner_mode:
* @drm_fd: drm file descriptor
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index dedc3f880..9a95e8e0a 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -1285,6 +1285,7 @@ bool igt_is_joiner_enabled_for_pipe(int drmfd, enum pipe pipe);
bool igt_ultrajoiner_possible(int drmfd, drmModeModeInfo *mode, int max_dotclock);
bool ultrajoiner_mode_found(int drm_fd, drmModeConnector *connector,
int max_dotclock, drmModeModeInfo *mode);
+drmModeModeInfo *igt_get_non_joiner_mode(int drm_fd, igt_output_t *output);
bool igt_has_force_joiner_debugfs(int drmfd, char *conn_name);
bool is_joiner_mode(int drm_fd, igt_output_t *output);
bool igt_check_force_joiner_status(int drmfd, char *connector_name);
--
2.34.1
next prev parent reply other threads:[~2026-02-23 9:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 9:34 [PATCH i-g-t 0/2] Add helper to select non-joiner mode Pranay Samala
2026-02-23 9:34 ` Pranay Samala [this message]
2026-02-26 12:09 ` [PATCH i-g-t 1/2] lib/igt_kms: Add helper to get " Reddy Guddati, Santhosh
2026-02-23 9:34 ` [PATCH i-g-t 2/2] tests/intel/kms_sharpness_filter: Detect and bypass joiner modes Pranay Samala
2026-03-03 1:30 ` Reddy Guddati, Santhosh
2026-02-23 13:08 ` ✓ Xe.CI.BAT: success for Add helper to select non-joiner mode Patchwork
2026-02-23 13:09 ` ✗ i915.CI.BAT: failure " Patchwork
2026-02-24 5:14 ` ✗ Xe.CI.FULL: " 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=20260223093443.1797078-2-pranay.samala@intel.com \
--to=pranay.samala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@intel.com \
--cc=sameer.lattannavar@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