[i-g-t 05/51] tests/kms_atomic_transition: Add support for Bigjoiner
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Thu Aug 11 16:42:09 UTC 2022
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_atomic_transition.c | 111 ++++++++++++++++++++++++++++------
1 file changed, 94 insertions(+), 17 deletions(-)
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 10b21c92..8d5ef6b4 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -755,8 +755,13 @@ static unsigned set_combinations(data_t *data, unsigned mask, struct igt_fb *fb)
if (output->pending_pipe != PIPE_NONE)
continue;
- mode = igt_output_get_mode(output);
- break;
+ igt_output_set_pipe(output, i);
+ if (igt_test_constraint(&data->display)) {
+ mode = igt_output_get_mode(output);
+ break;
+ } else {
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
}
if (!mode)
@@ -843,8 +848,12 @@ retry:
continue;
igt_output_set_pipe(output, i);
- mode = igt_output_get_mode(output);
- break;
+ if (igt_test_constraint(&data->display)) {
+ mode = igt_output_get_mode(output);
+ break;
+ } else {
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
}
if (mode) {
@@ -979,6 +988,19 @@ static void run_modeset_transition(data_t *data, int requested_outputs, bool non
run_modeset_tests(data, requested_outputs, nonblocking, fencing);
}
+static bool is_valid(igt_display_t *display, enum pipe pipe, igt_output_t *output)
+{
+ bool ret = true;
+
+ igt_display_reset(display);
+ igt_output_set_pipe(output, pipe);
+ if (!igt_test_constraint(display))
+ ret = false;
+ igt_output_set_pipe(output, PIPE_NONE);
+
+ return ret;
+}
+
static int opt_handler(int opt, int opt_index, void *_data)
{
data_t *data = _data;
@@ -1025,94 +1047,128 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
igt_describe("Check toggling of primary plane with vblank");
igt_subtest("plane-primary-toggle-with-vblank-wait") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
pipe_count++;
- run_primary_test(&data, pipe, output);
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
+ run_primary_test(&data, pipe, output);
}
- pipe_count = 0;
}
igt_describe("Transition test for all plane combinations");
igt_subtest_with_dynamic("plane-all-transition") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
pipe_count++;
+
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_PLANES, false, false);
test_cleanup(&data, pipe, output, false);
}
- pipe_count = 0;
}
igt_describe("Transition test for all plane combinations with fencing commit");
igt_subtest_with_dynamic("plane-all-transition-fencing") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
pipe_count++;
+
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_PLANES, false, true);
test_cleanup(&data, pipe, output, true);
}
- pipe_count = 0;
}
igt_describe("Transition test for all plane combinations with nonblocking commit");
igt_subtest_with_dynamic("plane-all-transition-nonblocking") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
pipe_count++;
+
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_PLANES, true, false);
test_cleanup(&data, pipe, output, false);
}
- pipe_count = 0;
}
igt_describe("Transition test for all plane combinations with nonblocking and fencing commit");
igt_subtest_with_dynamic("plane-all-transition-nonblocking-fencing") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
pipe_count++;
+
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_PLANES, true, true);
test_cleanup(&data, pipe, output, true);
}
- pipe_count = 0;
}
igt_describe("Transition test with non blocking commit and make sure commit of disabled plane has "
"to complete before atomic commit on that plane");
igt_subtest_with_dynamic("plane-use-after-nonblocking-unbind") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
pipe_count++;
+
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_AFTER_FREE, true, false);
test_cleanup(&data, pipe, output, false);
}
- pipe_count = 0;
}
igt_describe("Transition test with non blocking and fencing commit and make sure commit of "
"disabled plane has to complete before atomic commit on that plane");
igt_subtest_with_dynamic("plane-use-after-nonblocking-unbind-fencing") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
pipe_count++;
+
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_AFTER_FREE, true, true);
test_cleanup(&data, pipe, output, true);
}
- pipe_count = 0;
}
/*
@@ -1122,6 +1178,8 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
*/
igt_describe("Modeset test for all plane combinations");
igt_subtest_with_dynamic("plane-all-modeset-transition") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
@@ -1129,15 +1187,19 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
if (output_is_internal_panel(output))
continue;
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_MODESET, false, false);
test_cleanup(&data, pipe, output, false);
}
- pipe_count = 0;
}
igt_describe("Modeset test for all plane combinations with fencing commit");
igt_subtest_with_dynamic("plane-all-modeset-transition-fencing") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
@@ -1145,15 +1207,19 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
if (output_is_internal_panel(output))
continue;
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_MODESET, false, true);
test_cleanup(&data, pipe, output, true);
}
- pipe_count = 0;
}
igt_describe("Modeset test for all plane combinations on internal panels");
igt_subtest_with_dynamic("plane-all-modeset-transition-internal-panels") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
@@ -1161,15 +1227,19 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
if (!output_is_internal_panel(output))
continue;
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_MODESET_FAST, false, false);
test_cleanup(&data, pipe, output, false);
}
- pipe_count = 0;
}
igt_describe("Modeset test for all plane combinations on internal panels with fencing commit");
igt_subtest_with_dynamic("plane-all-modeset-transition-fencing-internal-panels") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
@@ -1177,23 +1247,30 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
if (!output_is_internal_panel(output))
continue;
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_transition_test(&data, pipe, output, TRANSITION_MODESET_FAST, false, true);
test_cleanup(&data, pipe, output, true);
}
- pipe_count = 0;
}
igt_describe("Check toggling and modeset transition on plane");
igt_subtest("plane-toggle-modeset-transition") {
+ pipe_count = 0;
+
for_each_pipe_with_valid_output(&data.display, pipe, output) {
if (pipe_count == 2 * count && !data.extended)
break;
pipe_count++;
+
+ if (!is_valid(&data.display, pipe, output))
+ continue;
+
run_transition_test(&data, pipe, output, TRANSITION_MODESET_DISABLE, false, false);
test_cleanup(&data, pipe, output, false);
}
- pipe_count = 0;
}
igt_describe("Modeset transition tests for combinations of crtc enabled");
--
2.35.1
More information about the Intel-gfx-trybot
mailing list