[igt-dev] [PATCH] tests/kms_plane: Fix skips/fails vs CRC cleanup
Jessica Zhang
quic_jesszhan at quicinc.com
Thu Oct 12 00:41:43 UTC 2023
On 10/11/2023 2:03 PM, Rob Clark wrote:
> From: Rob Clark <robdclark at chromium.org>
>
> test_fini() isn't necessarily called if a subtest skips/fails, leaving
> the kernel drm_crtc_crc still in the open state, causing further
> attempts to open/configure the crc to fail.
>
> Signed-off-by: Rob Clark <robdclark at chromium.org>
Hi Rob,
Thanks for the fix -- it looks good to me:
Reviewed-by: Jessica Zhang <quic_jesszhan at quicinc.com>
Tested-by: Jessica Zhang <quic_jesszhan at quicinc.com> # RB5 (sm8250)
BR,
Jessica Zhang
> ---
> tests/kms_plane.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 9a515559c9b0..b3d6043496b1 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -84,6 +84,8 @@ static color_t blue = { 0.0f, 0.0f, 1.0f };
> static void test_init(data_t *data, enum pipe pipe)
> {
> igt_require(data->display.pipes[pipe].n_planes > 0);
> + if (data->pipe_crc)
> + igt_pipe_crc_free(data->pipe_crc);
> data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
> IGT_PIPE_CRC_SOURCE_AUTO);
> igt_display_reset(&data->display);
> @@ -92,6 +94,7 @@ static void test_init(data_t *data, enum pipe pipe)
> static void test_fini(data_t *data)
> {
> igt_pipe_crc_free(data->pipe_crc);
> + data->pipe_crc = NULL;
> }
>
> enum {
> --
> 2.41.0
>
More information about the igt-dev
mailing list