[i-g-t,v2,2/2] tests/kms_flip: Change 2x tests execution order

Submitted by Kahola, Mika on June 13, 2018, 12:58 p.m.

Details

Message ID 1528894714-15939-3-git-send-email-mika.kahola@intel.com
State New
Headers show
Series "tests/kms_flip: Binary mode optimizations" ( rev: 3 ) in IGT

Not browsing as part of any series.

Commit Message

Kahola, Mika June 13, 2018, 12:58 p.m.
In order to optimize execution of kms_flip binary mode tests, let's change
the execution order so that 2x tests will be executed after basic tests.

On GLK platform with 1 display, the patch reduced the execution time by
2 seconds on average (2X tests were skipped). As these 2X tests are meant
to run with 2 display configuration the expected reduction in time on test
execution will be higher.

v2: update commit message (Petri)

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_flip.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 09aaac2..511ed8c 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1635,7 +1635,9 @@  int main(int argc, char **argv)
 			      tests[i].flags & TEST_BASIC ? "basic-" : "",
 			      tests[i].name)
 			run_test(opt.duration, tests[i].flags);
+	}
 
+	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
 		if (tests[i].flags & TEST_NO_2X_OUTPUT)
 			continue;
 
@@ -1657,8 +1659,13 @@  int main(int argc, char **argv)
 
 		igt_subtest_f( "%s-interruptible", tests[i].name)
 			run_test(opt.duration, tests[i].flags);
+	}
 
-		if (tests[i].flags & TEST_NO_2X_OUTPUT)
+	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
+		/* relative blocking vblank waits that get constantly interrupt
+		 * take forver. So don't do them. */
+		if ((tests[i].flags & TEST_VBLANK_BLOCK) &&
+		    !(tests[i].flags & TEST_VBLANK_ABSOLUTE))
 			continue;
 
 		/* code doesn't disable all crtcs, so skip rpm tests */