[Intel-gfx] [PATCH i-g-t v4 5/7] tests/kms_rotation_crc: Add TEST_ONLY flag

Mika Kahola mika.kahola at intel.com
Thu Mar 23 12:48:29 UTC 2017


Add TEST_ONLY flag to test atomic modesetting commits without
actual real-life commit.

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 tests/kms_rotation_crc.c | 139 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 4347884..68e9326 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -522,46 +522,109 @@ igt_main
 		igt_display_init(&data.display, data.gfx_fd);
 	}
 	igt_subtest_f("primary-rotation-180") {
+		data.display.force_test_atomic = false;
+		data.rotation = IGT_ROTATION_180;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+	}
+
+	igt_subtest_f("primary-rotation-180-with-test") {
+		data.display.force_test_atomic = true;
 		data.rotation = IGT_ROTATION_180;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
 	}
 
 	igt_subtest_f("sprite-rotation-180") {
+		data.display.force_test_atomic = false;
+		data.rotation = IGT_ROTATION_180;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
+	}
+
+	igt_subtest_f("sprite-rotation-180-with-test") {
+		data.display.force_test_atomic = true;
 		data.rotation = IGT_ROTATION_180;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
 	}
 
 	igt_subtest_f("cursor-rotation-180") {
+		data.display.force_test_atomic = false;
+		data.rotation = IGT_ROTATION_180;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_CURSOR);
+	}
+
+	igt_subtest_f("cursor-rotation-180-with-test") {
+		data.display.force_test_atomic = true;
 		data.rotation = IGT_ROTATION_180;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_CURSOR);
 	}
 
 	igt_subtest_f("primary-rotation-90") {
 		igt_require(gen >= 9);
+		data.display.force_test_atomic = false;
+		data.rotation = IGT_ROTATION_90;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+	}
+
+	igt_subtest_f("primary-rotation-90-with-test") {
+		igt_require(gen >= 9);
+		data.display.force_test_atomic = true;
 		data.rotation = IGT_ROTATION_90;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
 	}
 
 	igt_subtest_f("primary-rotation-270") {
 		igt_require(gen >= 9);
+		data.display.force_test_atomic = false;
+		data.rotation = IGT_ROTATION_270;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+	}
+
+	igt_subtest_f("primary-rotation-270-with-test") {
+		igt_require(gen >= 9);
+		data.display.force_test_atomic = true;
 		data.rotation = IGT_ROTATION_270;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
 	}
 
 	igt_subtest_f("sprite-rotation-90") {
 		igt_require(gen >= 9);
+		data.display.force_test_atomic = false;
+		data.rotation = IGT_ROTATION_90;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
+	}
+
+	igt_subtest_f("sprite-rotation-90-with-test") {
+		igt_require(gen >= 9);
+		data.display.force_test_atomic = true;
 		data.rotation = IGT_ROTATION_90;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
 	}
 
 	igt_subtest_f("sprite-rotation-270") {
 		igt_require(gen >= 9);
+		data.display.force_test_atomic = false;
+		data.rotation = IGT_ROTATION_270;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
+	}
+
+	igt_subtest_f("sprite-rotation-270-with-test") {
+		igt_require(gen >= 9);
+		data.display.force_test_atomic = true;
 		data.rotation = IGT_ROTATION_270;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
 	}
 
 	igt_subtest_f("sprite-rotation-90-pos-100-0") {
 		igt_require(gen >= 9);
+		data.display.force_test_atomic = false;
+		data.rotation = IGT_ROTATION_90;
+		data.pos_x = 100,
+		data.pos_y = 0;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
+	}
+
+	igt_subtest_f("sprite-rotation-90-pos-100-0-with-test") {
+		igt_require(gen >= 9);
+		data.display.force_test_atomic = true;
 		data.rotation = IGT_ROTATION_90;
 		data.pos_x = 100,
 		data.pos_y = 0;
@@ -574,6 +637,17 @@ igt_main
 		data.pos_y = 0;
 		data.rotation = IGT_ROTATION_90;
 		data.override_fmt = DRM_FORMAT_RGB565;
+		data.display.force_test_atomic = false;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+	}
+
+	igt_subtest_f("bad-pixel-format-with-test") {
+		igt_require(gen >= 9);
+		data.pos_x = 0,
+		data.pos_y = 0;
+		data.rotation = IGT_ROTATION_90;
+		data.override_fmt = DRM_FORMAT_RGB565;
+		data.display.force_test_atomic = true;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
 	}
 
@@ -582,6 +656,16 @@ igt_main
 		data.override_fmt = 0;
 		data.rotation = IGT_ROTATION_90;
 		data.override_tiling = LOCAL_DRM_FORMAT_MOD_NONE;
+		data.display.force_test_atomic = false;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+	}
+
+	igt_subtest_f("bad-tiling-with-test") {
+		igt_require(gen >= 9);
+		data.override_fmt = 0;
+		data.rotation = IGT_ROTATION_90;
+		data.override_tiling = LOCAL_DRM_FORMAT_MOD_NONE;
+		data.display.force_test_atomic = true;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
 	}
 
@@ -590,6 +674,16 @@ igt_main
 		data.override_tiling = 0;
 		data.flip_stress = 60;
 		data.rotation = IGT_ROTATION_90;
+		data.display.force_test_atomic = false;
+		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
+	}
+
+	igt_subtest_f("primary-rotation-90-flip-stress-with-test") {
+		igt_require(gen >= 9);
+		data.override_tiling = 0;
+		data.flip_stress = 60;
+		data.rotation = IGT_ROTATION_90;
+		data.display.force_test_atomic = true;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY);
 	}
 
@@ -600,6 +694,28 @@ igt_main
 
 		igt_require(gen >= 9);
 		data.rotation = IGT_ROTATION_90;
+		data.display.force_test_atomic = false;
+
+		for_each_pipe_with_valid_output(&data.display, pipe, output) {
+			igt_output_set_pipe(output, pipe);
+
+			test_plane_rotation_ytiled_obj(&data, output, DRM_PLANE_TYPE_PRIMARY);
+
+			valid_tests++;
+			break;
+		}
+
+		igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
+	}
+
+	igt_subtest_f("primary-rotation-90-Y-tiled-with-test") {
+		enum pipe pipe;
+		igt_output_t *output;
+		int valid_tests = 0;
+
+		igt_require(gen >= 9);
+		data.rotation = IGT_ROTATION_90;
+		data.display.force_test_atomic = true;
 
 		for_each_pipe_with_valid_output(&data.display, pipe, output) {
 			igt_output_set_pipe(output, pipe);
@@ -620,6 +736,29 @@ igt_main
 
 		igt_require(gen >= 9);
 
+		data.display.force_test_atomic = false;
+
+		for_each_pipe_with_valid_output(&data.display, pipe, output) {
+			igt_output_set_pipe(output, pipe);
+
+			test_plane_rotation_exhaust_fences(&data, output, DRM_PLANE_TYPE_PRIMARY);
+
+			valid_tests++;
+			break;
+		}
+
+		igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
+	}
+
+	igt_subtest_f("exhaust-fences-with-test") {
+		enum pipe pipe;
+		igt_output_t *output;
+		int valid_tests = 0;
+
+		igt_require(gen >= 9);
+
+		data.display.force_test_atomic = true;
+
 		for_each_pipe_with_valid_output(&data.display, pipe, output) {
 			igt_output_set_pipe(output, pipe);
 
-- 
2.7.4



More information about the Intel-gfx mailing list