[igt-dev] [i-g-t v5 07/52] tests/kms_color_helper: Helper to check Bigjoiner constraint

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Nov 15 16:58:31 UTC 2022


Add a helper to Skip the subtest if a selected pipe/output combo
won't support Bigjoiner or 8K mode.

Example:
* Pipe-D wont support a mode > 5K
* To use 8K mode on a pipe then consecutive pipe must be available & free.

V2: - Use updated helper name

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_color_helper.c | 12 ++++++++++++
 tests/kms_color_helper.h |  1 +
 2 files changed, 13 insertions(+)

diff --git a/tests/kms_color_helper.c b/tests/kms_color_helper.c
index 55f3e409..2f9950f8 100644
--- a/tests/kms_color_helper.c
+++ b/tests/kms_color_helper.c
@@ -24,6 +24,18 @@
 
 #include "kms_color_helper.h"
 
+bool pipe_output_combo_valid(data_t *data, enum pipe pipe)
+{
+	bool ret = true;
+
+	igt_output_set_pipe(data->output, pipe);
+	if (!i915_pipe_output_combo_valid(&data->display))
+		ret = false;
+	igt_output_set_pipe(data->output, PIPE_NONE);
+
+	return ret;
+}
+
 bool
 panel_supports_deep_color(int drm_fd, char *output_name)
 {
diff --git a/tests/kms_color_helper.h b/tests/kms_color_helper.h
index f0ae30e3..bfed2fb8 100644
--- a/tests/kms_color_helper.h
+++ b/tests/kms_color_helper.h
@@ -69,6 +69,7 @@ typedef struct {
 	color_t coeffs[];
 } gamma_lut_t;
 
+bool pipe_output_combo_valid(data_t *data, enum pipe pipe);
 bool panel_supports_deep_color(int fd, char *output_name);
 uint64_t get_max_bpc(igt_output_t *output);
 void paint_gradient_rectangles(data_t *data,
-- 
2.38.0



More information about the igt-dev mailing list