From fce6109b879f720755399f37701eff30c646f89b Mon Sep 17 00:00:00 2001 From: Juha-Pekka Heikkila Date: Wed, 17 Oct 2018 15:48:54 +0300 Subject: tests/kms_rotation_crc: Don't leave crc running Leaving crc running nobody reading it may fail tests randomly with dmesg comment "*ERROR* Overflow of CRC buffer, userspace reads too slow." v2 (Maarten Lankhorst): Don't change clean up code but just add flag for starting crc and stop it at end of test. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105748 Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Maarten Lankhorst --- tests/kms_rotation_crc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tests/kms_rotation_crc.c') diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index c233ef65..366c2546 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -142,7 +142,7 @@ static void cleanup_crtc(data_t *data) } static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe, - igt_plane_t *plane) + igt_plane_t *plane, bool start_crc) { igt_display_t *display = &data->display; @@ -156,7 +156,9 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe, 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); + + if (start_crc) + igt_pipe_crc_start(data->pipe_crc); } enum rectangle_type { @@ -361,7 +363,7 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form plane = igt_output_get_plane_type(output, plane_type); igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION)); - prepare_crtc(data, output, pipe, plane); + prepare_crtc(data, output, pipe, plane, true); for (i = 0; i < num_rectangle_types; i++) { /* Unsupported on i915 */ @@ -389,6 +391,7 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form data->override_fmt, test_bad_format); } } + igt_pipe_crc_stop(data->pipe_crc); } } @@ -410,7 +413,8 @@ 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); + prepare_crtc(data, output, pipe, plane, false); + mode = igt_output_get_mode(output); w = mode->hdisplay; h = mode->vdisplay; -- cgit v1.2.3