[PATCH i-g-t 3/4] tests/intel/kms_dsc_helper: Add helper func()

Swati Sharma swati2.sharma at intel.com
Tue Jan 7 18:57:08 UTC 2025


Add (big|ultra) joiner helper functions.

Signed-off-by: Swati Sharma <swati2.sharma at 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



More information about the igt-dev mailing list