[i-g-t 05/51] tests/kms_atomic_interruptible: Add support for Bigjoiner
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Wed Aug 17 10:54:23 UTC 2022
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.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_atomic_interruptible.c | 40 ++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/tests/kms_atomic_interruptible.c b/tests/kms_atomic_interruptible.c
index 038cb286..0dd293a1 100644
--- a/tests/kms_atomic_interruptible.c
+++ b/tests/kms_atomic_interruptible.c
@@ -82,11 +82,15 @@ static void run_plane_test(igt_display_t *display, enum pipe pipe, igt_output_t
igt_plane_t *primary, *plane;
int block;
+ igt_info("Using (pipe %s + %s) to run the subtest.\n",
+ kmstest_pipe_name(pipe), igt_output_name(output));
+
/*
* Make sure we start with everything disabled to force a real modeset.
* igt_display_require only sets sw state, and assumes the first test
* doesn't care about hw state.
*/
+ igt_display_reset(display);
igt_display_commit2(display, COMMIT_ATOMIC);
igt_output_set_pipe(output, pipe);
@@ -265,6 +269,21 @@ static void run_plane_test(igt_display_t *display, enum pipe pipe, igt_output_t
igt_remove_fb(display->drm_fd, &fb);
}
+static bool is_valid_combo(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;
+}
+
igt_main
{
igt_display_t display;
@@ -286,6 +305,9 @@ igt_main
igt_describe("Tests the interrupt properties of legacy modeset");
igt_subtest_with_dynamic("legacy-setmode") {
for_each_pipe_with_valid_output(&display, pipe, output) {
+ if (!is_valid_combo(&display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_plane_test(&display, pipe, output, test_legacy_modeset, DRM_PLANE_TYPE_PRIMARY);
break;
@@ -295,6 +317,9 @@ igt_main
igt_describe("Tests the interrupt properties of atomic modeset");
igt_subtest_with_dynamic("atomic-setmode") {
for_each_pipe_with_valid_output(&display, pipe, output) {
+ if (!is_valid_combo(&display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_plane_test(&display, pipe, output, test_atomic_modeset, DRM_PLANE_TYPE_PRIMARY);
break;
@@ -304,6 +329,9 @@ igt_main
igt_describe("Tests the interrupt properties for DPMS");
igt_subtest_with_dynamic("legacy-dpms") {
for_each_pipe_with_valid_output(&display, pipe, output) {
+ if (!is_valid_combo(&display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_plane_test(&display, pipe, output, test_legacy_dpms, DRM_PLANE_TYPE_PRIMARY);
break;
@@ -313,6 +341,9 @@ igt_main
igt_describe("Tests the interrupt properties for pageflip");
igt_subtest_with_dynamic("legacy-pageflip") {
for_each_pipe_with_valid_output(&display, pipe, output) {
+ if (!is_valid_combo(&display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_plane_test(&display, pipe, output, test_pageflip, DRM_PLANE_TYPE_PRIMARY);
break;
@@ -322,6 +353,9 @@ igt_main
igt_describe("Tests the interrupt properties for cursor");
igt_subtest_with_dynamic("legacy-cursor") {
for_each_pipe_with_valid_output(&display, pipe, output) {
+ if (!is_valid_combo(&display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_plane_test(&display, pipe, output, test_setcursor, DRM_PLANE_TYPE_CURSOR);
break;
@@ -331,6 +365,9 @@ igt_main
igt_describe("Tests the interrupt properties for primary plane");
igt_subtest_with_dynamic("universal-setplane-primary") {
for_each_pipe_with_valid_output(&display, pipe, output) {
+ if (!is_valid_combo(&display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_plane_test(&display, pipe, output, test_setplane, DRM_PLANE_TYPE_PRIMARY);
break;
@@ -340,6 +377,9 @@ igt_main
igt_describe("Tests the interrupt properties for cursor plane");
igt_subtest_with_dynamic("universal-setplane-cursor") {
for_each_pipe_with_valid_output(&display, pipe, output) {
+ if (!is_valid_combo(&display, pipe, output))
+ continue;
+
igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
run_plane_test(&display, pipe, output, test_setplane, DRM_PLANE_TYPE_CURSOR);
break;
--
2.35.1
More information about the Intel-gfx-trybot
mailing list