Skip to content

drm/imagination: Add async VM_BIND with sparse mappings

Gyeyoung Baek dri-devel linux-doc linux-media lkml 2 versions – New

Get series with b4
b4 am [email protected] change-id 20260817-pvr-vm-bind-1ce4f09a1774

Versions newest first

  1. v2 Latest6 patches 0 repliesNew
  2. v14 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- New patch 3, "Route map and unmap through pvr_vm_bind()".
- Split v1 3/4 into the ioctl (4) and the asynchronous mode (5).
- Bump the driver interface version to 1.2, as 1.1 is already taken by another patch.
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm/imagination: Switch the GPUVM to immediate modedrivers/gpu/drm/imagination/pvr_vm.c+30 -90 replies
2/6drm/imagination: Stop locking reservations around map and unmapdrivers/gpu/drm/imagination/pvr_vm.c+0 -440 replies
3/6drm/imagination: Route map and unmap through pvr_vm_bind()drivers/gpu/drm/imagination/pvr_fw_meta.c drivers/gpu/drm/imagination/pvr_fw_riscv.c drivers/gpu/drm/imagination/pvr_vm.c +1 more+205 -1570 replies
4/6drm/imagination: Add VM_BIND ioctlDocumentation/gpu/imagination/uapi.rst drivers/gpu/drm/imagination/pvr_drv.c drivers/gpu/drm/imagination/pvr_drv.h +1 more+268 -10 replies
5/6drm/imagination: Add asynchronous VM_BINDDocumentation/gpu/imagination/uapi.rst drivers/gpu/drm/imagination/pvr_drv.c drivers/gpu/drm/imagination/pvr_job.c +8 more+673 -300 replies
6/6drm/imagination: Add MAP_SPARSE to VM_BINDdrivers/gpu/drm/imagination/pvr_device.h drivers/gpu/drm/imagination/pvr_drv.c drivers/gpu/drm/imagination/pvr_vm.c +2 more+169 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/6] drm/imagination: Add async VM_BIND with sparse mappings

Userspace MR:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43794

This series is for Vulkan sparse binding.

- Patches 1-2 switch the GPUVM to immediate mode.
- Patch 3 moves the existing map and unmap paths onto a single bind entry point.
- Patch 4 adds the VM_BIND ioctl.
- Patch 5 adds asynchronous requests.
- Patch 6 adds sparse mappings.

Patches 1-2 were sent separately [1]. They conflict with drm-misc-next, so they are rebased and included here.

Testing:
Tested on BeagleY-AI.
- The existing IGT pvr_vm_map passes without regressions.
- dEQP-VK.sparse_resources passes for the sparse features the Mesa MR above exposes.

[1] https://lore.kernel.org/r/[email protected]

---
Changes in v2:
- New patch 3, "Route map and unmap through pvr_vm_bind()".
- Split v1 3/4 into the ioctl (4) and the asynchronous mode (5).
- Bump the driver interface version to 1.2, as 1.1 is already taken by another patch.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Gyeyoung Baek (6):
drm/imagination: Switch the GPUVM to immediate mode drm/imagination: Stop locking reservations around map and unmap drm/imagination: Route map and unmap through pvr_vm_bind() drm/imagination: Add VM_BIND ioctl
drm/imagination: Add asynchronous VM_BIND drm/imagination: Add MAP_SPARSE to VM_BIND

 Documentation/gpu/imagination/uapi.rst     |  15 +
 drivers/gpu/drm/imagination/pvr_device.h   |  10 +
 drivers/gpu/drm/imagination/pvr_drv.c      | 331 ++++++++++++
 drivers/gpu/drm/imagination/pvr_drv.h      |   4 +-
 drivers/gpu/drm/imagination/pvr_fw_meta.c  |   6 +-
 drivers/gpu/drm/imagination/pvr_fw_riscv.c |   6 +-
 drivers/gpu/drm/imagination/pvr_job.c      |   6 +
 drivers/gpu/drm/imagination/pvr_mmu.c      |   2 +-
 drivers/gpu/drm/imagination/pvr_mmu.h      |   1 +
 drivers/gpu/drm/imagination/pvr_queue.c    |   3 +
 drivers/gpu/drm/imagination/pvr_sync.c     | 146 +++++-
 drivers/gpu/drm/imagination/pvr_sync.h     |  13 +
 drivers/gpu/drm/imagination/pvr_vm.c       | 781 ++++++++++++++++++++++-------
 drivers/gpu/drm/imagination/pvr_vm.h       |  63 ++-
 include/uapi/drm/pvr_drm.h                 | 129 +++++
 15 files changed, 1303 insertions(+), 213 deletions(-)

---
base-commit: 2d5a8313d9cf989b8f53a5689a96e891bf99fb2c
change-id: 20260817-pvr-vm-bind-1ce4f09a1774
prerequisite-message-id: <[email protected]>
prerequisite-patch-id: 5188d944e90112e4cf2678e75255c7a91434ad09

Best regards,

Signature · 1 line
Gyeyoung Baek <[email protected]>