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

Mika Kahola mika.kahola at intel.com
Wed Feb 1 13:18:04 UTC 2017


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 at intel.com>
---
 tests/kms_plane_multiple.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

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);
-- 
2.7.4



More information about the Intel-gfx mailing list