[i-g-t 34/51] tests/kms_universal_plane: Add support for Bigjoiner
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Thu Aug 11 16:42:38 UTC 2022
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_universal_plane.c | 76 ++++++++++++++++++++++++++++++++-----
1 file changed, 66 insertions(+), 10 deletions(-)
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 3cb6d704..e3c56be3 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -745,6 +745,21 @@ gen9_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
gen9_test_fini(&test, output);
}
+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 void
run_tests_for_pipe(data_t *data, enum pipe pipe)
{
@@ -763,34 +778,74 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
igt_describe("Check the switching between different primary plane fbs with CRTC off");
igt_subtest_f("universal-plane-pipe-%s-functional",
- kmstest_pipe_name(pipe))
- for_each_valid_output_on_pipe(&data->display, pipe, output)
+ kmstest_pipe_name(pipe)) {
+ bool found = false;
+
+ for_each_valid_output_on_pipe(&data->display, pipe, output) {
+ if (!is_valid(&data->display, pipe, output))
+ continue;
+
functional_test_pipe(data, pipe, output);
+ }
+ igt_require(found);
+ }
igt_describe("Test for scale-up or scale-down using universal plane API without covering CRTC");
igt_subtest_f("universal-plane-pipe-%s-sanity",
- kmstest_pipe_name(pipe))
- for_each_valid_output_on_pipe(&data->display, pipe, output)
+ kmstest_pipe_name(pipe)) {
+ bool found = false;
+
+ for_each_valid_output_on_pipe(&data->display, pipe, output) {
+ if (!is_valid(&data->display, pipe, output))
+ continue;
+
sanity_test_pipe(data, pipe, output);
+ }
+ igt_require(found);
+ }
igt_describe("Check pageflips while primary plane is disabled before IOCTL or between IOCTL"
" and pageflip execution");
igt_subtest_f("disable-primary-vs-flip-pipe-%s",
- kmstest_pipe_name(pipe))
- for_each_valid_output_on_pipe(&data->display, pipe, output)
+ kmstest_pipe_name(pipe)) {
+ bool found = false;
+
+ for_each_valid_output_on_pipe(&data->display, pipe, output) {
+ if (!is_valid(&data->display, pipe, output))
+ continue;
+
pageflip_test_pipe(data, pipe, output);
+ }
+ igt_require(found);
+ }
igt_describe("Check for cursor leaks after performing cursor operations");
igt_subtest_f("cursor-fb-leak-pipe-%s",
- kmstest_pipe_name(pipe))
- for_each_valid_output_on_pipe(&data->display, pipe, output)
+ kmstest_pipe_name(pipe)) {
+ bool found = false;
+
+ for_each_valid_output_on_pipe(&data->display, pipe, output) {
+ if (!is_valid(&data->display, pipe, output))
+ continue;
+
cursor_leak_test_pipe(data, pipe, output);
+ }
+ igt_require(found);
+ }
igt_describe("Check if pageflip succeeds in windowed setting");
igt_subtest_f("universal-plane-gen9-features-pipe-%s",
- kmstest_pipe_name(pipe))
- for_each_valid_output_on_pipe(&data->display, pipe, output)
+ kmstest_pipe_name(pipe)) {
+ bool found = false;
+
+ for_each_valid_output_on_pipe(&data->display, pipe, output) {
+ if (!is_valid(&data->display, pipe, output))
+ continue;
+
gen9_test_pipe(data, pipe, output);
+ }
+ igt_require(found);
+ }
}
static data_t data;
@@ -808,6 +863,7 @@ igt_main
igt_require_pipe_crc(data.drm_fd);
igt_display_require(&data.display, data.drm_fd);
+ igt_display_require_output(&data.display);
}
for_each_pipe_static(pipe) {
--
2.35.1
More information about the Intel-gfx-trybot
mailing list