[PATCH i-g-t 4/4] tests/panthor: add panthor tests
Kamil Konieczny
kamil.konieczny at linux.intel.com
Fri Aug 29 11:31:51 UTC 2025
Hi Daniel,
On 2025-08-28 at 10:04:00 -0300, Daniel Almeida wrote:
> Add an initial test suit covering query device properties, allocating
> memory, binding and unbinding VA ranges through VM_BIND and submitting a
> simple piece of work through GROUP_SUBMIT.
Missing s-o-b here.
> ---
> lib/igt_panthor.c | 136 ++++++++++++++++++
> lib/igt_panthor.h | 20 +++
> tests/panthor/meson.build | 4 +
> tests/panthor/panthor_gem.c | 59 ++++++++
> tests/panthor/panthor_group.c | 264 ++++++++++++++++++++++++++++++++++
> tests/panthor/panthor_query.c | 25 ++++
> tests/panthor/panthor_vm.c | 73 ++++++++++
> 7 files changed, 581 insertions(+)
> create mode 100644 tests/panthor/panthor_gem.c
> create mode 100644 tests/panthor/panthor_group.c
> create mode 100644 tests/panthor/panthor_query.c
> create mode 100644 tests/panthor/panthor_vm.c
>
> diff --git a/lib/igt_panthor.c b/lib/igt_panthor.c
> index 3e2c29b17..c422320c5 100644
> --- a/lib/igt_panthor.c
> +++ b/lib/igt_panthor.c
> @@ -2,6 +2,9 @@
> // SPDX-FileCopyrightText: Copyright (C) 2025 Collabora Ltd.
>
> #include "igt_panthor.h"
> +#include "drmtest.h"
Keep it in alphabetical order, so "drmtest.h" before "igt_panthor.h"
> +#include "ioctl_wrappers.h"
> +#include "panthor_drm.h"
>
> /**
> * SECTION:igt_panthor
> @@ -12,3 +15,136 @@
> * This library provides various auxiliary helper functions for writing Panthor
> * tests.
> */
> +
> +void igt_panthor_query(int fd, int32_t type, void* data, size_t size, int err)
> +{
> + struct drm_panthor_dev_query query = {
Here and everywhere below use tabs in beginnig of line,
as checkpatch.pl should tell you. Also, in IGT there is
.checkpatch.conf in root folder, you could reuse it.
Regards,
Kamil
> + .type = type,
> + .pointer = (uintptr_t)data,
> + .size = size,
> + };
> +
> + if (err) {
> + do_ioctl_err(fd, DRM_IOCTL_PANTHOR_DEV_QUERY, &query, err);
> + } else {
> + do_ioctl(fd, DRM_IOCTL_PANTHOR_DEV_QUERY, &query);
> + }
> +}
[cut]
More information about the igt-dev
mailing list