Re: [PATCH i-g-t v3 10/10] tests/imagination: Add DEV_QUERY runtime_info tests

Kamil Konieczny <[email protected]>
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <[email protected]>
Hi Robert,
On 2026-07-17 at 16:21:42 +0200, Robert Mazur wrote:
> From: Donald Robson <[email protected]>
> 
> Add test validating runtime info fields from DEV_QUERY.
> 
> Signed-off-by: Donald Robson <[email protected]>
> Signed-off-by: Robert Mazur <[email protected]>
> ---
>  tests/imagination/meson.build        |  1 +
>  tests/imagination/pvr_runtime_info.c | 32 ++++++++++++++++++++++++++++++++
>  2 files changed, 33 insertions(+)
> 
> diff --git a/tests/imagination/meson.build b/tests/imagination/meson.build
> index dc08a5d8b..59749b51e 100644
> --- a/tests/imagination/meson.build
> +++ b/tests/imagination/meson.build
> @@ -5,6 +5,7 @@ pvr_progs = [ 'pvr_dev_query',
>  	      'pvr_heap_info',
>  	      'pvr_hwrt',
>  	      'pvr_quirks_enhancements',
> +	      'pvr_runtime_info',
>  	      'pvr_vm_context',
>  	    ]
>  
> diff --git a/tests/imagination/pvr_runtime_info.c b/tests/imagination/pvr_runtime_info.c
> new file mode 100644
> index 000000000..93eca5b3f
> --- /dev/null
> +++ b/tests/imagination/pvr_runtime_info.c
> @@ -0,0 +1,32 @@
> +// SPDX-License-Identifier: GPL-2.0 or MIT
> +/* Copyright (c) 2026 Imagination Technologies Ltd. All Rights Reserved */
> +
> +#include <stdbool.h>
> +
> +

Remove one empty line, now there are two while one is enough.

With above fixed this is
Acked-by: Kamil Konieczny <[email protected]>

Regards,
Kamil

> +#include "igt.h"
> +#include "igt_pvr.h"
> +
> +#include "pvr_drm.h"
> +
> +IGT_TEST_DESCRIPTION("Test that the runtime info query returns valid data");
> +
> +int igt_simple_main()
> +{
> +	int fd = drm_open_driver(DRIVER_POWERVR);
> +	struct drm_pvr_dev_query_runtime_info runtime_info = {0};
> +
> +	igt_pvr_ioctl_dev_query(fd, DRM_PVR_DEV_QUERY_RUNTIME_INFO_GET,
> +				sizeof(runtime_info), &runtime_info, 0);
> +
> +	igt_assert_neq_u64(runtime_info.free_list_min_pages, 0);
> +	igt_assert_lt_u64(runtime_info.free_list_min_pages,
> +			  runtime_info.free_list_max_pages);
> +
> +	igt_assert_neq(runtime_info.common_store_alloc_region_size, 0);
> +	igt_assert_neq(runtime_info.common_store_partition_space_size, 0);
> +
> +	igt_assert_neq(runtime_info.max_coeffs, 0);
> +
> +	igt_assert_neq(runtime_info.cdm_max_local_mem_size_regs, 0);
> +}
> 
> -- 
> 2.43.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.