Re: [PATCH i-g-t 2/2] tests/imagination: Add DEV_QUERY runtime_info tests
Kamil Konieczny <[email protected]> Wed, 29 Jul 2026 12:49:50 +0200
| Newsgroups | org.freedesktop.lists.igt-dev |
|---|---|
| Message-ID | <[email protected]> |
Hi Robert, On 2026-07-28 at 21:39:34 +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]> > Acked-by: Kamil Konieczny <[email protected]> Applied, thank you. Regards, Kamil > --- > tests/imagination/meson.build | 1 + > tests/imagination/pvr_runtime_info.c | 31 +++++++++++++++++++++++++++++++ > 2 files changed, 32 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..02496e043 > --- /dev/null > +++ b/tests/imagination/pvr_runtime_info.c > @@ -0,0 +1,31 @@ > +// SPDX-License-Identifier: GPL-2.0 or MIT > +/* Copyright (c) 2026 Imagination Technologies Ltd. All Rights Reserved */ > + > +#include <stdbool.h> > + > +#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 >