diff mbox

[i-g-t,v3,2/7] tests/kms_plane_multiple: Add TEST_ONLY flag

Message ID 1485955089-30267-3-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola Feb. 1, 2017, 1:18 p.m. UTC
Add TEST_ONLY flag to test atomic modesetting commits without
actual real-life commit.

v2: Use flag to indicate to test with TEST_ONLY flag with atomic
    commit

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_plane_multiple.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
diff mbox

Patch

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index bb84878..2104976 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -412,9 +412,37 @@  test_plane_position(data_t *data, enum pipe pipe, bool atomic, int n_planes,
 static void
 run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 {
+	igt_subtest_f("atomic-pipe-%s-tiling-x-planes-with-tests",
+		      kmstest_pipe_name(pipe)) {
+		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = true;
+		for (int planes = 0; planes < n_planes; planes++)
+			test_plane_position(data, pipe, true, n_planes,
+				planes, LOCAL_I915_FORMAT_MOD_X_TILED);
+	}
+
+	igt_subtest_f("atomic-pipe-%s-tiling-y-planes-with-tests",
+		      kmstest_pipe_name(pipe)) {
+		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = true;
+		for (int planes = 0; planes < n_planes; planes++)
+			test_plane_position(data, pipe, true, n_planes,
+				planes, LOCAL_I915_FORMAT_MOD_X_TILED);
+	}
+
+	igt_subtest_f("atomic-pipe-%s-tiling-yf-planes-with-tests",
+		      kmstest_pipe_name(pipe)) {
+		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = true;
+		for (int planes = 0; planes < n_planes; planes++)
+			test_plane_position(data, pipe, true, n_planes,
+				planes, LOCAL_I915_FORMAT_MOD_X_TILED);
+	}
+
 	igt_subtest_f("legacy-pipe-%s-tiling-none-planes",
 		      kmstest_pipe_name(pipe)) {
 		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = false;
 		for (int planes = 0; planes < n_planes; planes++)
 			test_plane_position(data, pipe, false,  n_planes,
 				planes, LOCAL_DRM_FORMAT_MOD_NONE);
@@ -423,6 +451,7 @@  run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("atomic-pipe-%s-tiling-none-planes",
 		      kmstest_pipe_name(pipe)) {
 		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = false;
 		for (int planes = 0; planes < n_planes; planes++)
 			test_plane_position(data, pipe, true, n_planes,
 				planes,	LOCAL_I915_FORMAT_MOD_X_TILED);
@@ -431,6 +460,7 @@  run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("legacy-pipe-%s-tiling-x-planes",
 		      kmstest_pipe_name(pipe)) {
 		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = false;
 		for (int planes = 0; planes < n_planes; planes++)
 			test_plane_position(data, pipe, false, n_planes,
 				planes, LOCAL_I915_FORMAT_MOD_X_TILED);
@@ -439,6 +469,7 @@  run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("atomic-pipe-%s-tiling-x-planes",
 		      kmstest_pipe_name(pipe)) {
 		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = false;
 		for (int planes = 0; planes < n_planes; planes++)
 			test_plane_position(data, pipe, true, n_planes,
 				planes, LOCAL_I915_FORMAT_MOD_X_TILED);
@@ -447,6 +478,7 @@  run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("legacy-pipe-%s-tiling-y-planes",
 		      kmstest_pipe_name(pipe)) {
 		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = false;
 		for (int planes = 0; planes < n_planes; planes++)
 			test_plane_position(data, pipe, false, n_planes,
 				planes, LOCAL_I915_FORMAT_MOD_Y_TILED);
@@ -455,6 +487,7 @@  run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("atomic-pipe-%s-tiling-y-planes",
 		      kmstest_pipe_name(pipe)) {
 		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = false;
 		for (int planes = 0; planes < n_planes; planes++)
 			test_plane_position(data, pipe, true, n_planes,
 				planes, LOCAL_I915_FORMAT_MOD_Y_TILED);
@@ -463,6 +496,7 @@  run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("legacy-pipe-%s-tiling-yf-planes",
 		      kmstest_pipe_name(pipe)) {
 		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = false;
 		for (int planes = 0; planes < n_planes; planes++)
 			test_plane_position(data, pipe, false, n_planes,
 				planes, LOCAL_I915_FORMAT_MOD_Yf_TILED);
@@ -471,6 +505,7 @@  run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("atomic-pipe-%s-tiling-yf-planes",
 		      kmstest_pipe_name(pipe)) {
 		int n_planes = data->display.pipes[pipe].n_planes;
+		data->display.force_test_atomic = false;
 		for (int planes = 0; planes < n_planes; planes++)
 			test_plane_position(data, pipe, true, n_planes,
 				planes, LOCAL_I915_FORMAT_MOD_Yf_TILED);