Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] panthor: Allow specifying offset when mapping a BO against a VM
@ 2025-11-27  3:01 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
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Adrián Larumbe @ 2025-11-27  3:01 UTC (permalink / raw)
  To: igt-dev, Petri Latvala, Arkadiusz Hiler, Kamil Konieczny,
	Juha-Pekka Heikkila, Bhanuprakash Modem
  Cc: Boris Brezillon, Steven Price, Liviu Dudau, Adrián Larumbe,
	Daniel Almeida, kernel

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>
---
 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);
+}
+
 enum cs_opcode {
 	CS_OPCODE_NOP = 0,
 	CS_OPCODE_MOVE48 = 1,

base-commit: 7bc8d310594c1dc1a851451845d1ea3c15fbd53d
-- 
2.51.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-11-27 12:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/2] " Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox