[igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Don't leave crc running

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Fri Sep 28 12:18:09 UTC 2018


Leaving crc running nobody reading it may fail tests randomly
with dmesg comment "*ERROR* Overflow of CRC buffer, userspace
reads too slow."

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105748
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 tests/kms_rotation_crc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index f73c6a3..4951626 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -146,15 +146,11 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
 {
 	igt_display_t *display = &data->display;
 
-	cleanup_crtc(data);
-
 	igt_output_set_pipe(output, pipe);
 	igt_plane_set_rotation(plane, IGT_ROTATION_0);
+	igt_display_commit2(display, COMMIT_ATOMIC);
 
 	/* create the pipe_crc object for this pipe */
-	igt_pipe_crc_free(data->pipe_crc);
-
-	igt_display_commit2(display, COMMIT_ATOMIC);
 	data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
 	igt_pipe_crc_start(data->pipe_crc);
 }
@@ -389,6 +385,7 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
 						 data->override_fmt, test_bad_format);
 			}
 		}
+		cleanup_crtc(data);
 	}
 }
 
@@ -410,7 +407,10 @@ static void test_plane_rotation_exhaust_fences(data_t *data,
 
 	igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION));
 
-	prepare_crtc(data, output, pipe, plane);
+	igt_output_set_pipe(output, pipe);
+	igt_plane_set_rotation(plane, IGT_ROTATION_0);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
 	mode = igt_output_get_mode(output);
 	w = mode->hdisplay;
 	h = mode->vdisplay;
-- 
2.7.4



More information about the igt-dev mailing list