]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
accel/amdxdna: Support user space allocated buffer
authorLizhi Hou <lizhi.hou@amd.com>
Wed, 16 Jul 2025 16:44:14 +0000 (09:44 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Tue, 22 Jul 2025 15:34:29 +0000 (08:34 -0700)
commitbd72d4acda1069579b35123e3cc0b21ec1193a21
tree71a0e3c6bc2e348027add08b566363eb2c0ff577
parent956f82e529dd283382f080273ed3b8db1e978699
accel/amdxdna: Support user space allocated buffer

Enhance DRM_IOCTL_AMDXDNA_CREATE_BO to accept user space allocated
buffer pointer. The buffer pages will be pinned in memory. Unless
the CAP_IPC_LOCK is enabled for the application process, the total
pinned memory can not beyond rlimit_memlock.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250716164414.112091-1-lizhi.hou@amd.com
drivers/accel/amdxdna/Makefile
drivers/accel/amdxdna/amdxdna_gem.c
drivers/accel/amdxdna/amdxdna_ubuf.c [new file with mode: 0644]
drivers/accel/amdxdna/amdxdna_ubuf.h [new file with mode: 0644]
include/uapi/drm/amdxdna_accel.h