Add TEST_ONLY flag to test atomic modesetting commits without actual real-life commit. Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx> --- tests/kms_cursor_legacy.c | 230 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 204 insertions(+), 26 deletions(-) diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c index c7083a0..97adf8c 100644 --- a/tests/kms_cursor_legacy.c +++ b/tests/kms_cursor_legacy.c @@ -1441,53 +1441,165 @@ igt_main igt_subtest("all-pipes-torture-move") stress(&display, -1, -ncpus, DRM_MODE_CURSOR_MOVE, 20); - igt_subtest("nonblocking-modeset-vs-cursor-atomic") + igt_subtest("nonblocking-modeset-vs-cursor-atomic") { + display.force_test_atomic = false; nonblocking_modeset_vs_cursor(&display, 1); + } + + igt_subtest("nonblocking-modeset-vs-cursor-atomic-with-test") { + display.force_test_atomic = true; + nonblocking_modeset_vs_cursor(&display, 1); + } - igt_subtest("long-nonblocking-modeset-vs-cursor-atomic") + igt_subtest("long-nonblocking-modeset-vs-cursor-atomic") { + display.force_test_atomic = false; nonblocking_modeset_vs_cursor(&display, 16); + } - igt_subtest("2x-flip-vs-cursor-legacy") + igt_subtest("long-nonblocking-modeset-vs-cursor-atomic-with-test") { + display.force_test_atomic = true; + nonblocking_modeset_vs_cursor(&display, 16); + } + + igt_subtest("2x-flip-vs-cursor-legacy") { + display.force_test_atomic = false; + two_screens_flip_vs_cursor(&display, 8, false, false); + } + + igt_subtest("2x-flip-vs-cursor-legacy-with-test") { + display.force_test_atomic = true; two_screens_flip_vs_cursor(&display, 8, false, false); + } + + igt_subtest("2x-flip-vs-cursor-atomic") { + display.force_test_atomic = false; + two_screens_flip_vs_cursor(&display, 4, false, true); + } - igt_subtest("2x-flip-vs-cursor-atomic") + igt_subtest("2x-flip-vs-cursor-atomic-with-test") { + display.force_test_atomic = true; two_screens_flip_vs_cursor(&display, 4, false, true); + } - igt_subtest("2x-cursor-vs-flip-legacy") + igt_subtest("2x-cursor-vs-flip-legacy") { + display.force_test_atomic = false; two_screens_cursor_vs_flip(&display, 8, false); + } + + igt_subtest("2x-cursor-vs-flip-legacy-with-test") { + display.force_test_atomic = true; + two_screens_cursor_vs_flip(&display, 8, false); + } - igt_subtest("2x-long-flip-vs-cursor-legacy") + igt_subtest("2x-long-flip-vs-cursor-legacy") { + display.force_test_atomic = false; two_screens_flip_vs_cursor(&display, 150, false, false); + } + + igt_subtest("2x-long-flip-vs-cursor-legacy-with-test") { + display.force_test_atomic = true; + two_screens_flip_vs_cursor(&display, 150, false, false); + } + + igt_subtest("2x-long-flip-vs-cursor-atomic") { + display.force_test_atomic = false; + two_screens_flip_vs_cursor(&display, 150, false, true); + } - igt_subtest("2x-long-flip-vs-cursor-atomic") + igt_subtest("2x-long-flip-vs-cursor-atomic-with-test") { + display.force_test_atomic = true; two_screens_flip_vs_cursor(&display, 150, false, true); + } - igt_subtest("2x-long-cursor-vs-flip-legacy") + igt_subtest("2x-long-cursor-vs-flip-legacy") { + display.force_test_atomic = false; two_screens_cursor_vs_flip(&display, 50, false); + } - igt_subtest("2x-nonblocking-modeset-vs-cursor-atomic") + igt_subtest("2x-long-cursor-vs-flip-legacy-with-test") { + display.force_test_atomic = true; + two_screens_cursor_vs_flip(&display, 50, false); + } + + igt_subtest("2x-nonblocking-modeset-vs-cursor-atomic") { + display.force_test_atomic = false; two_screens_flip_vs_cursor(&display, 8, true, true); + } + + igt_subtest("2x-nonblocking-modeset-vs-cursor-atomic-with-test") { + display.force_test_atomic = true; + two_screens_flip_vs_cursor(&display, 8, true, true); + } + + igt_subtest("2x-cursor-vs-flip-atomic") { + display.force_test_atomic = false; + two_screens_cursor_vs_flip(&display, 8, true); + } - igt_subtest("2x-cursor-vs-flip-atomic") + igt_subtest("2x-cursor-vs-flip-atomic-with-test") { + display.force_test_atomic = true; two_screens_cursor_vs_flip(&display, 8, true); + } - igt_subtest("2x-long-nonblocking-modeset-vs-cursor-atomic") + igt_subtest("2x-long-nonblocking-modeset-vs-cursor-atomic") { + display.force_test_atomic = false; two_screens_flip_vs_cursor(&display, 150, true, true); + } - igt_subtest("2x-long-cursor-vs-flip-atomic") + igt_subtest("2x-long-nonblocking-modeset-vs-cursor-atomic-with-test") { + display.force_test_atomic = true; + two_screens_flip_vs_cursor(&display, 150, true, true); + } + + igt_subtest("2x-long-cursor-vs-flip-atomic") { + display.force_test_atomic = false; two_screens_cursor_vs_flip(&display, 50, true); + } - igt_subtest("flip-vs-cursor-crc-legacy") + igt_subtest("2x-long-cursor-vs-flip-atomic-with-test") { + display.force_test_atomic = true; + two_screens_cursor_vs_flip(&display, 50, true); + } + + igt_subtest("flip-vs-cursor-crc-legacy") { + display.force_test_atomic = false; + flip_vs_cursor_crc(&display, false); + } + + igt_subtest("flip-vs-cursor-crc-legacy-with-test") { + display.force_test_atomic = true; flip_vs_cursor_crc(&display, false); + } - igt_subtest("flip-vs-cursor-crc-atomic") + igt_subtest("flip-vs-cursor-crc-atomic") { + display.force_test_atomic = false; flip_vs_cursor_crc(&display, true); + } + + igt_subtest("flip-vs-cursor-crc-atomic-with-test") { + display.force_test_atomic = true; + flip_vs_cursor_crc(&display, true); + } - igt_subtest("flip-vs-cursor-busy-crc-legacy") + igt_subtest("flip-vs-cursor-busy-crc-legacy") { + display.force_test_atomic = false; flip_vs_cursor_busy_crc(&display, false); + } - igt_subtest("flip-vs-cursor-busy-crc-atomic") + igt_subtest("flip-vs-cursor-busy-crc-legacy-with-test") { + display.force_test_atomic = true; + flip_vs_cursor_busy_crc(&display, false); + } + + igt_subtest("flip-vs-cursor-busy-crc-atomic") { + display.force_test_atomic = false; + flip_vs_cursor_busy_crc(&display, true); + } + + igt_subtest("flip-vs-cursor-busy-crc-atomic-with-test") { + display.force_test_atomic = true; flip_vs_cursor_busy_crc(&display, true); + } for (i = 0; i <= flip_test_last; i++) { const char *modes[flip_test_last+1] = { @@ -1509,33 +1621,99 @@ igt_main default: break; } - igt_subtest_f("%sflip-before-cursor-%s", prefix, modes[i]) + igt_subtest_f("%sflip-before-cursor-%s", prefix, modes[i]) { + display.force_test_atomic = false; + basic_flip_cursor(&display, i, FLIP_BEFORE_CURSOR, 0); + } + + igt_subtest_f("%sflip-before-cursor-%s-with-test", prefix, modes[i]) { + display.force_test_atomic = true; basic_flip_cursor(&display, i, FLIP_BEFORE_CURSOR, 0); + } - if (!cursor_slowpath(i)) - igt_subtest_f("%sbusy-flip-before-cursor-%s", prefix, modes[i]) + if (!cursor_slowpath(i)) { + igt_subtest_f("%sbusy-flip-before-cursor-%s", prefix, modes[i]) { + display.force_test_atomic = false; basic_flip_cursor(&display, i, FLIP_BEFORE_CURSOR, BASIC_BUSY); + } - igt_subtest_f("%sflip-after-cursor-%s", prefix, modes[i]) + igt_subtest_f("%sbusy-flip-before-cursor-%s-with-test", prefix, modes[i]) { + display.force_test_atomic = true; + basic_flip_cursor(&display, i, FLIP_BEFORE_CURSOR, + BASIC_BUSY); + } + } + + igt_subtest_f("%sflip-after-cursor-%s", prefix, modes[i]) { + display.force_test_atomic = false; + basic_flip_cursor(&display, i, FLIP_AFTER_CURSOR, 0); + } + + igt_subtest_f("%sflip-after-cursor-%s-with-test", prefix, modes[i]) { + display.force_test_atomic = true; basic_flip_cursor(&display, i, FLIP_AFTER_CURSOR, 0); + } - igt_subtest_f("flip-vs-cursor-%s", modes[i]) + igt_subtest_f("flip-vs-cursor-%s", modes[i]) { + display.force_test_atomic = false; flip_vs_cursor(&display, i, 150); - igt_subtest_f("cursor-vs-flip-%s", modes[i]) + } + + igt_subtest_f("flip-vs-cursor-%s-with-test", modes[i]) { + display.force_test_atomic = true; + flip_vs_cursor(&display, i, 150); + } + + igt_subtest_f("cursor-vs-flip-%s", modes[i]) { + display.force_test_atomic = false; cursor_vs_flip(&display, i, 50); + } - igt_subtest_f("cursorA-vs-flipA-%s", modes[i]) + igt_subtest_f("cursor-vs-flip-%s-with-test", modes[i]) { + display.force_test_atomic = true; + cursor_vs_flip(&display, i, 50); + } + + igt_subtest_f("cursorA-vs-flipA-%s", modes[i]) { + display.force_test_atomic = false; + flip(&display, 0, 0, 10, i); + } + + igt_subtest_f("cursorA-vs-flipA-%s-with-test", modes[i]) { + display.force_test_atomic = true; flip(&display, 0, 0, 10, i); + } - igt_subtest_f("cursorA-vs-flipB-%s", modes[i]) + igt_subtest_f("cursorA-vs-flipB-%s", modes[i]) { + display.force_test_atomic = false; flip(&display, 0, 1, 10, i); + } + + igt_subtest_f("cursorA-vs-flipB-%s-with-test", modes[i]) { + display.force_test_atomic = true; + flip(&display, 0, 1, 10, i); + } + + igt_subtest_f("cursorB-vs-flipA-%s", modes[i]) { + display.force_test_atomic = false; + flip(&display, 1, 0, 10, i); + } - igt_subtest_f("cursorB-vs-flipA-%s", modes[i]) + igt_subtest_f("cursorB-vs-flipA-%s-with-test", modes[i]) { + display.force_test_atomic = true; flip(&display, 1, 0, 10, i); + } + + igt_subtest_f("cursorB-vs-flipB-%s", modes[i]) { + display.force_test_atomic = false; + flip(&display, 1, 1, 10, i); + } - igt_subtest_f("cursorB-vs-flipB-%s", modes[i]) + igt_subtest_f("cursorB-vs-flipB-%s-with-test", modes[i]) { + display.force_test_atomic = true; flip(&display, 1, 1, 10, i); + } } igt_fixture { -- 2.7.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx