From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t 2/4] lib/igt_kms: Add igt_is_(big|ultra)_joiner_supported_by_source()
Date: Wed, 8 Jan 2025 00:27:07 +0530 [thread overview]
Message-ID: <20250107185709.116756-3-swati2.sharma@intel.com> (raw)
In-Reply-To: <20250107185709.116756-1-swati2.sharma@intel.com>
Add func() returning true/false if platform supports big/ultra
joiner and use corresponding func() in related binaries.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
lib/igt_kms.c | 41 ++++++++++++++++++++++++++++++++++++++++
lib/igt_kms.h | 2 ++
tests/intel/kms_joiner.c | 8 +++-----
3 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 8ee8741d9..6640a6a58 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -7301,3 +7301,44 @@ int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *c
return 0;
}
+
+/**
+ * igt_is_bigjoiner_supported_by_source:
+ * @drm_fd: drm file descriptor
+ *
+ * Returns: True if bigjoiner is supported by platform, false otherwise
+ */
+bool igt_is_bigjoiner_supported_by_source(int drm_fd)
+{
+ int disp_ver;
+ disp_ver = intel_display_ver(intel_get_drm_devid(drm_fd));
+
+ if (disp_ver < 12) {
+ igt_info("Bigjoiner is not supported on D11 and older platforms\n");
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * igt_is_ultrajoiner_supported_by_source:
+ * @drm_fd: drm file descriptor
+ *
+ * Returns: True if ultrajoiner is supported by platform, false otherwise
+ */
+bool igt_is_ultrajoiner_supported_by_source(int drm_fd)
+{
+ bool is_dgfx;
+ int disp_ver;
+
+ is_dgfx = is_xe_device(drm_fd) ? xe_has_vram(drm_fd) : gem_has_lmem(drm_fd);
+ disp_ver = intel_display_ver(intel_get_drm_devid(drm_fd));
+
+ if ((is_dgfx && disp_ver == 14) || (disp_ver > 14)) {
+ igt_info("Ultrajoiner is supported on igfx with D14+ and on dgfx with D14\n");
+ return true;
+ }
+
+ return false;
+}
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index c4d76bdcb..e8a296c18 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -1257,6 +1257,8 @@ 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);
bool igt_check_bigjoiner_support(igt_display_t *display);
+bool igt_is_bigjoiner_supported_by_source(int drm_fd);
+bool igt_is_ultrajoiner_supported_by_source(int drm_fd);
bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode);
bool intel_pipe_output_combo_valid(igt_display_t *display);
bool igt_check_output_is_dp_mst(igt_output_t *output);
diff --git a/tests/intel/kms_joiner.c b/tests/intel/kms_joiner.c
index 418ff26a6..2b72aa786 100644
--- a/tests/intel/kms_joiner.c
+++ b/tests/intel/kms_joiner.c
@@ -411,8 +411,8 @@ static void test_ultra_joiner(data_t *data, bool invalid_pipe, bool two_display,
igt_main
{
- bool ultra_joiner_supported, is_dgfx;
- int i, j, display_ver;
+ bool ultra_joiner_supported;
+ int i, j;
igt_output_t *output;
drmModeModeInfo mode;
data_t data;
@@ -434,9 +434,7 @@ igt_main
igt_require(data.display.is_atomic);
max_dotclock = igt_get_max_dotclock(data.drm_fd);
- is_dgfx = is_xe_device(data.drm_fd) ? xe_has_vram(data.drm_fd) : gem_has_lmem(data.drm_fd);
- display_ver = intel_display_ver(intel_get_drm_devid(data.drm_fd));
- if ((is_dgfx && display_ver == 14) || (display_ver > 14))
+ if (igt_is_ultrajoiner_supported_by_source(data.drm_fd))
ultra_joiner_supported = true;
for_each_connected_output(&data.display, output) {
--
2.25.1
next prev parent reply other threads:[~2025-01-07 18:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 18:57 [PATCH i-g-t 0/4] Add dsc+bigjoiner subtest Swati Sharma
2025-01-07 18:57 ` [PATCH i-g-t 1/4] lib/igt_kms: Add igt_get_joined_pipes_name() Swati Sharma
2025-01-08 18:21 ` B, Jeevan
2025-01-07 18:57 ` Swati Sharma [this message]
2025-01-08 18:26 ` [PATCH i-g-t 2/4] lib/igt_kms: Add igt_is_(big|ultra)_joiner_supported_by_source() B, Jeevan
2025-01-07 18:57 ` [PATCH i-g-t 3/4] tests/intel/kms_dsc_helper: Add helper func() Swati Sharma
2025-03-12 8:46 ` Nautiyal, Ankit K
2025-01-07 18:57 ` [PATCH i-g-t 4/4] tests/intel/kms_dsc: Add force dsc and joiner test cases Swati Sharma
2025-03-12 9:09 ` Nautiyal, Ankit K
2025-03-12 12:51 ` Nautiyal, Ankit K
2025-01-07 22:56 ` ✗ Xe.CI.BAT: failure for Add dsc+bigjoiner subtest (rev4) Patchwork
2025-01-07 22:57 ` ✓ i915.CI.BAT: success " Patchwork
2025-01-08 6:21 ` ✗ i915.CI.Full: failure " Patchwork
2025-01-09 14:20 ` ✗ 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=20250107185709.116756-3-swati2.sharma@intel.com \
--to=swati2.sharma@intel.com \
--cc=ankit.k.nautiyal@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