[igt-dev] [i-g-t v5 26/52] tests/kms_plane_multiple: Add support for Bigjoiner

Bhanuprakash Modem
2022-11-15T17:10:30Z

This patch will add a check 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@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
---
tests/kms_plane_multiple.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 75659015..7dd9d586 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -103,6 +103,7 @@ get_reference_crc(data_t *data, igt_output_t *output, enum pipe pipe,
igt_plane_t *primary;
int ret;

+ igt_display_reset(&data->display);
igt_output_set_pipe(output, pipe);

primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
@@ -290,6 +291,9 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
bool loop_forever;
char info[256];

+ igt_info("Using (pipe %s + %s) to run the subtest.\n",
+ kmstest_pipe_name(pipe), igt_output_name(output));
+
if (opt.iterations == LOOP_FOREVER) {
loop_forever = true;
sprintf(info, "forever");
@@ -373,12 +377,17 @@ static void run_test(data_t *data, uint64_t modifier)
{
enum pipe pipe;
igt_output_t *output;
+ igt_display_t *display = &data->display;

- if (!igt_display_has_format_mod(&data->display, DRM_FORMAT_XRGB8888, modifier))
+ if (!igt_display_has_format_mod(display, DRM_FORMAT_XRGB8888, modifier))
return;

- for_each_pipe_with_valid_output(&data->display, pipe, output) {
- igt_display_reset(&data->display);
+ for_each_pipe_with_valid_output(display, pipe, output) {
+ igt_display_reset(display);
+
+ igt_output_set_pipe(output, pipe);
+ if (!i915_pipe_output_combo_valid(display))
+ continue;

igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name)
test_plane_position(data, pipe, output, modifier);
--
2.38.0