All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org,
	"Petri Latvala" <adrinael@adrinael.net>,
	"Arkadiusz Hiler" <arek@hiler.eu>,
	"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>,
	"Bhanuprakash Modem" <bhanuprakash.modem@gmail.com>,
	"Steven Price" <steven.price@arm.com>,
	"Liviu Dudau" <liviu.dudau@arm.com>,
	"Adrián Larumbe" <adrian.larumbe@collabora.com>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	kernel@collabora.com
Subject: Re: [PATCH i-g-t v1 v1 3/3] tests/panthor: Add scheduler tests
Date: Fri, 28 Nov 2025 10:40:43 +0100	[thread overview]
Message-ID: <20251128104043.4b33976c@fedora> (raw)
In-Reply-To: <20251127150037.3s7celzcl25sv74h@kamilkon-DESK.igk.intel.com>

Hi Kamil,

On Thu, 27 Nov 2025 16:00:37 +0100
Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:

> Hi Boris,
> On 2025-11-26 at 11:55:58 +0100, Boris Brezillon wrote:
> > Tests developed while working on this set of fixes [1].
> > 
> > [1]https://lore.kernel.org/all/20251112115142.1270931-1-boris.brezillon@collabora.com/
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > ---
> >  lib/igt_panthor.c             |  46 +++++
> >  lib/igt_panthor.h             |  77 ++++++++
> >  tests/panthor/meson.build     |   1 +
> >  tests/panthor/panthor_sched.c | 338 ++++++++++++++++++++++++++++++++++
> >  4 files changed, 462 insertions(+)
> >  create mode 100644 tests/panthor/panthor_sched.c
> > 
> > diff --git a/lib/igt_panthor.c b/lib/igt_panthor.c
> > index 73ada9c59bfc..5ae1a26b0e44 100644
> > --- a/lib/igt_panthor.c
> > +++ b/lib/igt_panthor.c
> > @@ -2,6 +2,7 @@
> >  // SPDX-FileCopyrightText: Copyright (C) 2025 Collabora Ltd.
> >  
> >  #include "drmtest.h"
> > +#include "igt_aux.h"
> >  #include "igt_panthor.h"
> >  #include "ioctl_wrappers.h"
> >  #include "panthor_drm.h"
> > @@ -370,3 +371,48 @@ void igt_panthor_free_bo(int fd, struct panthor_bo *bo)
> >  
> >  	gem_close(fd, bo->handle);
> >  }
> > +
> > +void igt_panthor_ctx_create(int fd, struct panthor_ctx *ctx)  
> 
> Please add description to each new library function, here
> and below.

Done.

> 
> > +{
> > +	memset(ctx, 0, sizeof(*ctx));
> > +	igt_panthor_query(fd, DRM_PANTHOR_DEV_QUERY_GPU_INFO,
> > +			  &ctx->gpu_info, sizeof(ctx->gpu_info), 0);
> > +	igt_panthor_vm_create(fd, &ctx->vm, 0);
> > +}
> > +
> > +void igt_panthor_ctx_destroy(int fd, struct panthor_ctx *ctx)
> > +{
> > +	for (uint32_t i = 0; i < ctx->group_count; i++) {
> > +		struct drm_panthor_group_destroy group_destroy = {
> > +			.group_handle = ctx->groups[i],
> > +		};
> > +
> > +		igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_PANTHOR_GROUP_DESTROY, &group_destroy), 0);
> > +	}
> > +
> > +	igt_panthor_vm_destroy(fd, ctx->vm, 0);
> > +}
> > +
> > +void igt_panthor_ctx_add_group(int fd, struct panthor_ctx *ctx,
> > +			       enum drm_panthor_group_priority group_prio,
> > +			       const struct drm_panthor_queue_create *queues,
> > +			       uint32_t queue_count)
> > +{
> > +	unsigned int shader_core_count = igt_hweight(ctx->gpu_info.shader_present);
> > +	struct drm_panthor_group_create group_create = {
> > +		.queues = DRM_PANTHOR_OBJ_ARRAY(queue_count, queues),
> > +		.max_compute_cores = shader_core_count,
> > +		.max_fragment_cores = shader_core_count,
> > +		.max_tiler_cores = 1,
> > +		.priority = group_prio,
> > +		.compute_core_mask = ctx->gpu_info.shader_present,
> > +		.fragment_core_mask = ctx->gpu_info.shader_present,
> > +		.tiler_core_mask = ctx->gpu_info.tiler_present,
> > +		.vm_id = ctx->vm,
> > +	};
> > +
> > +	igt_assert(ctx->group_count < ARRAY_SIZE(ctx->groups));
> > +	igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_PANTHOR_GROUP_CREATE, &group_create), 0);
> > +	igt_assert(group_create.group_handle > 0);
> > +	ctx->groups[ctx->group_count++] = group_create.group_handle;
> > +}
> > diff --git a/lib/igt_panthor.h b/lib/igt_panthor.h
> > index dc90033c0ad4..17b91b81cb40 100644
> > --- a/lib/igt_panthor.h
> > +++ b/lib/igt_panthor.h
> > @@ -9,6 +9,8 @@
> >  #include <stdbool.h>  
> 
> Add newline here.
> 
> >  #include "panthor_drm.h"
> >  
> > +#include "panthor_drm.h"  
> 
> You already have it.

Fixed.

Thanks,

Boris

  reply	other threads:[~2025-11-28  9:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26 10:55 [PATCH i-g-t v1 v1 0/3] tests/panthor: Add more tests Boris Brezillon
2025-11-26 10:55 ` [PATCH i-g-t v1 v1 1/3] drm-uapi/panthor: Sync panthor uapi Boris Brezillon
2025-11-27 14:56   ` Kamil Konieczny
2025-11-28  9:39     ` Boris Brezillon
2025-11-26 10:55 ` [PATCH i-g-t v1 v1 2/3] tests/panthor: Add a test to make sure the buffer is zeroed at alloc time Boris Brezillon
2025-11-27 14:57   ` Kamil Konieczny
2025-11-27 15:32   ` Daniel Almeida
2025-11-26 10:55 ` [PATCH i-g-t v1 v1 3/3] tests/panthor: Add scheduler tests Boris Brezillon
2025-11-27 15:00   ` Kamil Konieczny
2025-11-28  9:40     ` Boris Brezillon [this message]
2025-11-26 14:25 ` ✓ i915.CI.BAT: success for tests/panthor: Add more tests Patchwork
2025-11-26 15:06 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-26 16:53 ` ✗ Xe.CI.Full: failure " Patchwork
2025-11-26 21:35 ` ✗ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251128104043.4b33976c@fedora \
    --to=boris.brezillon@collabora.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=adrinael@adrinael.net \
    --cc=arek@hiler.eu \
    --cc=bhanuprakash.modem@gmail.com \
    --cc=daniel.almeida@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=kernel@collabora.com \
    --cc=liviu.dudau@arm.com \
    --cc=steven.price@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.