Draft: drm/msm: sparse / "VM_BIND" support
Conversion to DRM GPU VA Manager, and adding support for Vulkan Sparse Memory in the form of:
- A new
VM_BIND
submitqueue type for executing VMMSM_SUBMIT_BO_OP_MAP
/MAP_NULL
/UNMAP
commands - Extending the
SUBMIT
ioctl to allow submitting batches of one or moreMAP
/MAP_NULL
/UNMAP
commands to aVM_BIND
submitqueue
The UABI takes a slightly different approach from what other drivers have done, and what would make sense if starting from a clean sheet, ie separate VM_BIND
and EXEC
ioctls. But since we have to maintain support for the existing SUBMIT
ioctl, and because the fence, syncobj, and BO pinning is largely the same between legacy "BO-table" style SUBMIT
ioctls, and new-style VM updates submitted to a VM_BIND
submitqueue, I chose to go the route of extending the existing SUBMIT
ioctl rather than adding a new ioctl.
I also did not implement support for synchronous VM_BIND
commands. Since
userspace could just immediately wait for the SUBMIT
to complete, I don't
think we need this extra complexity in the kernel. Synchronous/immediate
VM_BIND
operations could be implemented with a 2nd VM_BIND
submitqueue.
The corresponding mesa MR: mesa/mesa!32533
This MR can be found in patch form if you prefer: https://patchwork.freedesktop.org/series/142263/