[igt-dev] [i-g-t 07/51] tests/kms_color_helper: Helper to check Bigjoiner constraint
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Sun Aug 14 18:08:24 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.
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..a5b45c80 100644
--- a/tests/kms_color_helper.c
+++ b/tests/kms_color_helper.c
@@ -24,6 +24,18 @@
#include "kms_color_helper.h"
+bool test_constraint(data_t *data, enum pipe pipe)
+{
+ bool ret = true;
+
+ igt_output_set_pipe(data->output, pipe);
+ if (!igt_test_constraint(&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..576c2416 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 test_constraint(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.35.1
More information about the igt-dev
mailing list