]> Gentwo Git Trees - linux/.git/commit
accel/rocket: Add IOCTL for BO creation
authorTomeu Vizoso <tomeu@tomeuvizoso.net>
Mon, 21 Jul 2025 09:17:30 +0000 (11:17 +0200)
committerJeff Hugo <jeff.hugo@oss.qualcomm.com>
Fri, 25 Jul 2025 16:00:36 +0000 (10:00 -0600)
commit658ebeac33517bd3169d4b65ed801e9065d0211a
tree7543b57a4a0592da8702ddb5f89ac30de4ed1a30
parented98261b41687323ffa02ca20fef1e60b38fd1aa
accel/rocket: Add IOCTL for BO creation

This uses the SHMEM DRM helpers and we map right away to the CPU and NPU
sides, as all buffers are expected to be accessed from both.

v2:
- Sync the IOMMUs for the other cores when mapping and unmapping.

v3:
- Make use of GPL-2.0-only for the copyright notice (Jeff Hugo)

v6:
- Use mutexes guard (Markus Elfring)

v7:
- Assign its own IOMMU domain to each client, for isolation (Daniel
  Stone and Robin Murphy)

v8:
- Correctly acquire a reference to the IOMMU (Robin Murphy)
- Allocate DMA address ourselves with drm_mm (Robin Murphy)
- Use refcount_read (Heiko Stuebner)
- Remove superfluous dma_sync_sgtable_for_device (Robin Murphy)

Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721-6-10-rocket-v9-3-77ebd484941e@tomeuvizoso.net
drivers/accel/rocket/Makefile
drivers/accel/rocket/rocket_drv.c
drivers/accel/rocket/rocket_drv.h
drivers/accel/rocket/rocket_gem.c [new file with mode: 0644]
drivers/accel/rocket/rocket_gem.h [new file with mode: 0644]
include/uapi/drm/rocket_accel.h [new file with mode: 0644]