[igt-dev] [PATCH i-g-t 2/3] i915/kms_mmap_write_crc: Free the mmap and dma-buf fd
Andrzej Hajda
andrzej.hajda at intel.com
Wed Jun 21 10:30:32 UTC 2023
On 21.06.2023 11:00, Swati Sharma wrote:
> From: Chris Wilson <chris.p.wilson at intel.com>
>
> Release the dma-buf fd (held also by the mmap) after testing so
> that we can check for kernel resource leaks at exit.
>
> Cc: Andrzej Hajda <andrzej.hajda at intel.com>
> Signed-off-by: Chris Wilson <chris.p.wilson at intel.com>
> Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
> ---
> tests/i915/kms_mmap_write_crc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c
> index bc51975f..87f51153 100644
> --- a/tests/i915/kms_mmap_write_crc.c
> +++ b/tests/i915/kms_mmap_write_crc.c
> @@ -165,6 +165,9 @@ static void test(data_t *data)
> /* check that the crc is as expected, which requires that caches got flushed */
> igt_pipe_crc_collect_crc(data->pipe_crc, &crc);
> igt_assert_crc_equal(&crc, &data->ref_crc);
> +
> + munmap(ptr, fb->size);
> + close(dma_buf_fd);
Reviewed-by: Andrzej Hajda <andrzej.hajda at intel.com>
Regards
Andrzej
> }
>
> static void prepare_crtc(data_t *data)
More information about the igt-dev
mailing list