public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] Added a subtest where multiple pipes are enabled and multiple planes are enabled on each of these pipes.
@ 2019-04-23 11:24 Nidhi Gupta
  2019-04-23 13:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2019-04-23 15:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Nidhi Gupta @ 2019-04-23 11:24 UTC (permalink / raw)
  To: igt-dev; +Cc: Nidhi Gupta, juha-pekka.heikkila

---
 tests/kms_plane_multiple.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index d2d02a5..c11de9d 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -299,6 +299,52 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 }
 
 static void
+test_multiple_plane_position_with_output(data_t *data, enum pipe pipe,
+				igt_output_t *output, int n_planes,
+				uint64_t tiling)
+{
+	color_t blue  = { 0.0f, 0.0f, 1.0f };
+	igt_crc_t crc;
+	int i;
+	int iterations = opt.iterations < 1 ? 1 : opt.iterations;
+	bool loop_forever;
+	char info[256];
+
+	if (opt.iterations == LOOP_FOREVER) {
+		loop_forever = true;
+		sprintf(info, "forever");
+	} else {
+		loop_forever = false;
+		sprintf(info, "for %d %s",
+			iterations, iterations > 1 ? "iterations" : "iteration");
+	}
+
+	igt_info("Testing connector %s using pipe %s with %d planes %s with seed %d\n",
+		 igt_output_name(output), kmstest_pipe_name(pipe), n_planes,
+		 info, opt.seed);
+
+	test_init(data, pipe, n_planes);
+
+	test_grab_crc(data, output, pipe, &blue, tiling);
+
+	i = 0;
+	while (i < iterations || loop_forever) {
+		prepare_planes(data, pipe, &blue, tiling, n_planes, output);
+
+		igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
+		igt_pipe_crc_get_current(data->display.drm_fd, data->pipe_crc, &crc);
+
+		igt_assert_crc_equal(&data->ref_crc, &crc);
+
+		i++;
+	}
+
+	//test_fini(data, output, n_planes);
+}
+
+
+static void
 test_plane_position(data_t *data, enum pipe pipe, uint64_t tiling)
 {
 	igt_output_t *output;
@@ -317,6 +363,25 @@ test_plane_position(data_t *data, enum pipe pipe, uint64_t tiling)
 }
 
 static void
+test_multiple_plane_position(data_t *data, enum pipe pipe, uint64_t tiling)
+{
+	igt_output_t *output;
+	int n_planes = data->display.pipes[pipe].n_planes;
+
+	output = igt_get_single_output_for_pipe(&data->display, pipe);
+	igt_require(output);
+
+	if (!opt.user_seed)
+		opt.seed = time(NULL);
+
+	srand(opt.seed);
+
+	test_multiple_plane_position_with_output(data, pipe, output,
+					n_planes, tiling);
+}
+
+
+static void
 run_tests_for_pipe(data_t *data, enum pipe pipe)
 {
 	igt_fixture {
@@ -393,6 +458,12 @@ int main(int argc, char *argv[])
 			run_tests_for_pipe(&data, pipe);
 	}
 
+	igt_subtest_f("atomic-maximum-pipes-tiling-none") {
+	for_each_pipe_static(pipe)
+		test_multiple_plane_position(&data, pipe, LOCAL_DRM_FORMAT_MOD_NONE);
+	}
+
+
 	igt_fixture {
 		igt_display_fini(&data.display);
 	}
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-23 15:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-23 11:24 [igt-dev] [PATCH i-g-t] Added a subtest where multiple pipes are enabled and multiple planes are enabled on each of these pipes Nidhi Gupta
2019-04-23 13:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-23 15:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox