[igt-dev] [PATCH 1/2] tests/kms_plane_multiple: Turn off pipe as well if all planes are off

Michel Dänzer michel at daenzer.net
Fri Aug 21 16:39:27 UTC 2020


From: Michel Dänzer <mdaenzer at redhat.com>

And only collect CRC data while the pipe is on.

This makes the test compatible with setups which don't support an
enabled pipe without any enabled planes.

Signed-off-by: Michel Dänzer <mdaenzer at redhat.com>
---
 tests/kms_plane_multiple.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 8310981c..2a1341d0 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -78,8 +78,6 @@ static void test_init(data_t *data, enum pipe pipe, int n_planes)
 
 static void test_fini(data_t *data, igt_output_t *output, int n_planes)
 {
-	igt_pipe_crc_stop(data->pipe_crc);
-
 	/* reset the constraint on the pipe */
 	igt_output_set_pipe(output, PIPE_ANY);
 
@@ -316,6 +314,7 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 		for_each_plane_on_pipe(&data->display, pipe, plane)
 			igt_plane_set_fb(plane, NULL);
 
+		igt_output_set_pipe(output, PIPE_NONE);
 		igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
 		for (int x = 0; x < c; x++)
@@ -329,8 +328,6 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 		 igt_output_name(output), kmstest_pipe_name(pipe), c,
 		 info, opt.seed);
 
-	igt_pipe_crc_start(data->pipe_crc);
-
 	i = 0;
 	while (i < iterations || loop_forever) {
 		/* randomize planes and set up the holes */
@@ -338,11 +335,14 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 		igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
+		igt_pipe_crc_start(data->pipe_crc);
 		igt_pipe_crc_get_current(data->display.drm_fd, data->pipe_crc, &crc);
+		igt_pipe_crc_stop(data->pipe_crc);
 
 		for_each_plane_on_pipe(&data->display, pipe, plane)
 			igt_plane_set_fb(plane, NULL);
 
+		igt_output_set_pipe(output, PIPE_NONE);
 		igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
 		for (int x = 0; x < c; x++)
-- 
2.28.0



More information about the igt-dev mailing list