All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: igt-dev@lists.freedesktop.org,
	Petri Latvala <adrinael@adrinael.net>,
	Arkadiusz Hiler <arek@hiler.eu>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	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>,
	Daniel Almeida <daniel.almeida@collabora.com>,
	kernel@collabora.com
Subject: Re: [PATCH 1/2] panthor: Allow specifying offset when mapping a BO against a VM
Date: Thu, 27 Nov 2025 09:48:46 +0100	[thread overview]
Message-ID: <20251127094846.7eea71f1@fedora> (raw)
In-Reply-To: <20251127030145.585641-1-adrian.larumbe@collabora.com>

Hello Adrian,

Quick note for v2, make sure you use "PATCH i-g-t vX" as a
--subject-prefix, so it's clear those are IGT patches.

On Thu, 27 Nov 2025 03:01:43 +0000
Adrián Larumbe <adrian.larumbe@collabora.com> wrote:

> A future commit that tests VM_BIND unmapping of regions backed by huge
> pages will make use of it. Leave the old interface as an inlined
> function that passes 0 as a default BO offset.
> 
> Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>

with a minor formatting improvement suggested below.

> ---
>  lib/igt_panthor.c | 5 +++--
>  lib/igt_panthor.h | 9 +++++++--
>  2 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/igt_panthor.c b/lib/igt_panthor.c
> index 73ada9c59bfc..49b427d4f162 100644
> --- a/lib/igt_panthor.c
> +++ b/lib/igt_panthor.c
> @@ -234,12 +234,13 @@ void igt_panthor_vm_destroy(int fd, uint32_t vm_id, int err)
>   *
>   * Bind a buffer object to a virtual address in the specified VM.
>   */
> -void igt_panthor_vm_bind(int fd, uint32_t vm_id, uint32_t bo_handle,
> -			 uint64_t va, uint64_t size, uint32_t flags, int err)
> +void igt_panthor_vm_bind_offset(int fd, uint32_t vm_id, uint32_t bo_handle, uint64_t va,
> +				uint64_t size, uint64_t offset, uint32_t flags, int err)
>  {
>  	struct drm_panthor_vm_bind_op bind_op = {
>  		.flags = flags,
>  		.bo_handle = bo_handle,
> +		.bo_offset = offset,
>  		.va = va,
>  		.size = size,
>  	};
> diff --git a/lib/igt_panthor.h b/lib/igt_panthor.h
> index dc90033c0ad4..1fe0271d48c9 100644
> --- a/lib/igt_panthor.h
> +++ b/lib/igt_panthor.h
> @@ -19,8 +19,8 @@ struct panthor_bo {
>  void igt_panthor_query(int fd, int32_t type, void *data, size_t size, int err);
>  void igt_panthor_vm_create(int fd, uint32_t *vm_id, int err);
>  void igt_panthor_vm_destroy(int fd, uint32_t vm_id, int err);
> -void igt_panthor_vm_bind(int fd, uint32_t vm_id, uint32_t bo_handle, uint64_t va,
> -			 uint64_t size, uint32_t flags, int err);
> +void igt_panthor_vm_bind_offset(int fd, uint32_t vm_id, uint32_t bo_handle, uint64_t va,
> +			 uint64_t size, uint64_t ofsfet, uint32_t flags, int err);
>  void igt_panthor_bo_create(int fd, struct panthor_bo *bo, uint64_t size, uint32_t flags, int err);
>  uint64_t igt_panthor_bo_mmap_offset(int fd, uint32_t handle, int err);
>  void igt_panthor_free_bo(int fd, struct panthor_bo *bo);
> @@ -38,6 +38,11 @@ void igt_panthor_group_submit_simple(int fd, uint32_t group_handle,
>  				     int err);
>  uint64_t igt_panthor_get_first_core(uint64_t cores_present);
>  
> +static inline void igt_panthor_vm_bind(int fd, uint32_t vm_id, uint32_t bo_handle,
> +				       uint64_t va, uint64_t size, uint32_t flags, int err) {
> +	igt_panthor_vm_bind_offset(fd, vm_id, bo_handle, va, size, 0, flags, err);
> +}

formatting nit:

static inline void
igt_panthor_vm_bind(int fd, uint32_t vm_id, uint32_t bo_handle, uint64_t va,
		    uint64_t size, uint32_t flags, int err)
{
	igt_panthor_vm_bind_offset(fd, vm_id, bo_handle, va, size, 0, flags, err);
}

> +
>  enum cs_opcode {
>  	CS_OPCODE_NOP = 0,
>  	CS_OPCODE_MOVE48 = 1,
> 
> base-commit: 7bc8d310594c1dc1a851451845d1ea3c15fbd53d


      parent reply	other threads:[~2025-11-27  8:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  3:01 [PATCH 1/2] panthor: Allow specifying offset when mapping a BO against a VM Adrián Larumbe
2025-11-27  3:01 ` [PATCH 2/2] tests/panthor: Add VM_BIND tests for partial huge page unmaps Adrián Larumbe
2025-11-27  8:53   ` Boris Brezillon
2025-11-27 12:13   ` Kamil Konieczny
2025-11-27  4:20 ` ✓ i915.CI.BAT: success for series starting with [1/2] panthor: Allow specifying offset when mapping a BO against a VM Patchwork
2025-11-27  4:32 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-27  5:24 ` ✗ Xe.CI.Full: failure " Patchwork
2025-11-27  8:00 ` ✗ i915.CI.Full: " Patchwork
2025-11-27  8:48 ` Boris Brezillon [this message]

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=20251127094846.7eea71f1@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.