[igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Don't leave crc running
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Fri Oct 12 15:20:19 UTC 2018
Op 28-09-18 om 14:18 schreef Juha-Pekka Heikkila:
> 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);
Don't put this here..
We always clean up CRTC at the start. This is because a previous subtest failure shouldn't cause future subtests to fail.
Put an igt_pipe_crc_stop() here instead..
> }
> }
>
> @@ -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);
Add a bool needs_crc to prepare_crtc instead?
> +
> mode = igt_output_get_mode(output);
> w = mode->hdisplay;
> h = mode->vdisplay;
More information about the igt-dev
mailing list