Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 3/4] tests/intel/kms_dsc_helper: Add helper func()
Date: Wed,  8 Jan 2025 00:27:08 +0530	[thread overview]
Message-ID: <20250107185709.116756-4-swati2.sharma@intel.com> (raw)
In-Reply-To: <20250107185709.116756-1-swati2.sharma@intel.com>

Add (big|ultra) joiner helper functions.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/intel/kms_dsc_helper.c | 46 ++++++++++++++++++++++++++++++++++++
 tests/intel/kms_dsc_helper.h |  2 ++
 2 files changed, 48 insertions(+)

diff --git a/tests/intel/kms_dsc_helper.c b/tests/intel/kms_dsc_helper.c
index cea4304e4..8543498a7 100644
--- a/tests/intel/kms_dsc_helper.c
+++ b/tests/intel/kms_dsc_helper.c
@@ -201,3 +201,49 @@ bool is_dsc_fractional_bpp_supported(int disp_ver, int drmfd, igt_output_t *outp
 
 	return true;
 }
+
+bool check_bigjoiner_constraints(int disp_ver, int n_pipes, int drmfd, igt_output_t *output)
+{
+	if (!igt_is_bigjoiner_supported_by_source(drmfd))
+		return false;
+
+	if (n_pipes < 2) {
+		igt_info("Bigjoiner requires minimum 2 pipes\n");
+		return false;
+	}
+
+	if (igt_get_dsc_sink_max_slice_count(drmfd, output->name) < 4) {
+		igt_info("Output %s doesn't support minimum 4 slice count\n", igt_output_name(output));
+		return false;
+	}
+
+	if (!igt_has_force_joiner_debugfs(drmfd, output->name)) {
+		igt_info("Output %s doesn't support force_joiner debugfs\n", igt_output_name(output));
+		return false;
+	}
+
+	return true;
+}
+
+bool check_ultrajoiner_constraints(int disp_ver, int n_pipes, int drmfd, igt_output_t *output)
+{
+	if (!igt_is_ultrajoiner_supported_by_source(drmfd))
+		return false;
+
+	if (n_pipes < 4) {
+		igt_info("Ultrajoiner requires minimum 4 pipes\n");
+		return false;
+	}
+
+	if (igt_get_dsc_sink_max_slice_count(drmfd, output->name) < 8) {
+		igt_info("Output %s doesn't support minimum 8 slice count\n", igt_output_name(output));
+		return false;
+	}
+
+	if (!igt_has_force_joiner_debugfs(drmfd, output->name)) {
+		igt_info("Output %s doesn't support force_joiner debugfs\n", igt_output_name(output));
+		return false;
+	}
+
+	return true;
+}
diff --git a/tests/intel/kms_dsc_helper.h b/tests/intel/kms_dsc_helper.h
index 4dbd88fe7..a24696640 100644
--- a/tests/intel/kms_dsc_helper.h
+++ b/tests/intel/kms_dsc_helper.h
@@ -38,5 +38,7 @@ void force_dsc_fractional_bpp_enable(int drmfd, igt_output_t *output);
 void save_force_dsc_fractional_bpp_en(int drmfd, igt_output_t *output);
 void restore_force_dsc_fractional_bpp_en(void);
 bool is_dsc_fractional_bpp_supported(int disp_ver, int drmfd, igt_output_t *output);
+bool check_bigjoiner_constraints(int disp_ver, int n_pipes, int drmfd, igt_output_t *output);
+bool check_ultrajoiner_constraints(int disp_ver, int n_pipes, int drmfd, igt_output_t *output);
 
 #endif
-- 
2.25.1


  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 ` [PATCH i-g-t 2/4] lib/igt_kms: Add igt_is_(big|ultra)_joiner_supported_by_source() Swati Sharma
2025-01-08 18:26   ` B, Jeevan
2025-01-07 18:57 ` Swati Sharma [this message]
2025-03-12  8:46   ` [PATCH i-g-t 3/4] tests/intel/kms_dsc_helper: Add helper func() 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-4-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