public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Adrián Larumbe" <adrian.larumbe@collabora.com>
To: 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>
Cc: "Boris Brezillon" <boris.brezillon@collabora.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>,
	"Janne Grunau" <j@jannau.net>,
	"Danilo Krummrich" <dakr@kernel.org>,
	kernel@collabora.com
Subject: [PATCH v1 3/4] test/panthor: Add support for repeated mappings
Date: Fri, 13 Mar 2026 17:58:30 +0000	[thread overview]
Message-ID: <20260313175908.1752151-4-adrian.larumbe@collabora.com> (raw)
In-Reply-To: <20260313175908.1752151-1-adrian.larumbe@collabora.com>

Reflect this in the IGT function interface for VM_BIND.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
---
 lib/igt_panthor.c          |  4 +++-
 lib/igt_panthor.h          | 12 ++++++++++--
 tests/panthor/panthor_vm.c |  3 ++-
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/lib/igt_panthor.c b/lib/igt_panthor.c
index 3c96a40b7c45..6e231c10ec73 100644
--- a/lib/igt_panthor.c
+++ b/lib/igt_panthor.c
@@ -235,7 +235,8 @@ 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_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)
+				uint64_t size, uint64_t offset, uint32_t flags, int err,
+				uint64_t repeat)
 {
 	struct drm_panthor_vm_bind_op bind_op = {
 		.flags = flags,
@@ -243,6 +244,7 @@ void igt_panthor_vm_bind_offset(int fd, uint32_t vm_id, uint32_t bo_handle, uint
 		.bo_offset = offset,
 		.va = va,
 		.size = size,
+		.bo_repeat_range = repeat,
 	};
 
 	struct drm_panthor_vm_bind vm_bind = {
diff --git a/lib/igt_panthor.h b/lib/igt_panthor.h
index a4756e8e88ab..02ff79083161 100644
--- a/lib/igt_panthor.h
+++ b/lib/igt_panthor.h
@@ -20,7 +20,8 @@ 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_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);
+				uint64_t size, uint64_t ofsfet, uint32_t flags, int err,
+				uint64_t repeat);
 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);
@@ -42,7 +43,14 @@ size_t igt_panthor_issue_store_multiple(uint8_t *cs, uint64_t device_va, uint32_
 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);
+	igt_panthor_vm_bind_offset(fd, vm_id, bo_handle, va, size, 0, flags, err, 0);
+}
+
+static inline void igt_panthor_vm_bind_repeat(int fd, uint32_t vm_id, uint32_t bo_handle,
+					      uint64_t va, uint64_t size, uint32_t flags, int err,
+					      uint64_t repeat)
+{
+	igt_panthor_vm_bind_offset(fd, vm_id, bo_handle, va, size, 0, flags, err, repeat);
 }
 
 enum cs_opcode {
diff --git a/tests/panthor/panthor_vm.c b/tests/panthor/panthor_vm.c
index 76a669843f5c..bbd5fe94d0e0 100644
--- a/tests/panthor/panthor_vm.c
+++ b/tests/panthor/panthor_vm.c
@@ -4,6 +4,7 @@
 #include "igt.h"
 #include "igt_core.h"
 #include "igt_panthor.h"
+#include "igt_syncobj.h"
 #include "panthor_drm.h"
 
 int igt_main() {
@@ -146,7 +147,7 @@ int igt_main() {
 
 		igt_panthor_bo_create(fd, &bo, bo_size, 0, 0);
 		igt_panthor_vm_bind_offset(fd, vm_id, bo.handle, 0x200000,
-					   SZ_4M, SZ_2M, DRM_PANTHOR_VM_BIND_OP_TYPE_MAP, 0);
+					   SZ_4M, SZ_2M, DRM_PANTHOR_VM_BIND_OP_TYPE_MAP, 0, 0);
 
 		igt_panthor_vm_bind(fd, vm_id, 0, 0x200000, bo_size,
 				    DRM_PANTHOR_VM_BIND_OP_TYPE_UNMAP, 0);
-- 
2.53.0


  parent reply	other threads:[~2026-03-13 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 17:58 [PATCH v1 0/4] Test panthor repeated mappings Adrián Larumbe
2026-03-13 17:58 ` [PATCH v1 1/4] drm-uapi/panthor: Sync panthor uapi Adrián Larumbe
2026-03-16 12:21   ` Kamil Konieczny
2026-03-13 17:58 ` [PATCH v1 2/4] panthor: Move issue_store_multiple into library file Adrián Larumbe
2026-03-13 17:58 ` Adrián Larumbe [this message]
2026-03-13 17:58 ` [PATCH v1 4/4] tests/panthor: Add VM_BIND repeat tests Adrián Larumbe
2026-03-13 18:28 ` ✓ Xe.CI.BAT: success for Test panthor repeated mappings Patchwork
2026-03-13 19:05 ` ✗ i915.CI.BAT: failure " Patchwork
2026-03-14 22:35 ` ✗ Xe.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=20260313175908.1752151-4-adrian.larumbe@collabora.com \
    --to=adrian.larumbe@collabora.com \
    --cc=adrinael@adrinael.net \
    --cc=arek@hiler.eu \
    --cc=bhanuprakash.modem@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=j@jannau.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox