]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: Lock all gpuva ops during VM bind IOCTL
authorMatthew Brost <matthew.brost@intel.com>
Thu, 25 Apr 2024 04:55:01 +0000 (21:55 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Fri, 26 Apr 2024 19:09:55 +0000 (12:09 -0700)
commit77f2ef3f16f511c8a8444061d59c8eadc634d33b
tree4abfec9ef64982d9cd754aac268337f9de70bafe
parent6a2a90cba12b42eb96c2af3426b77ceb4be31df2
drm/xe: Lock all gpuva ops during VM bind IOCTL

Lock all BOs used in gpuva ops and validate all BOs in a single step
during the VM bind IOCTL.

This help with the transition to making all gpuva ops in a VM bind IOCTL
a single atomic job which is required for proper error handling.

v2:
 - Better commit message (Oak)
 - s/op_lock/op_lock_and_prep, few other renames too (Oak)
 - Use DRM_EXEC_IGNORE_DUPLICATES flag in drm_exec_init (local testing)
 - Do not reserve slots in locking step (direction based on series from Thomas)
v3:
 - Validate BO if is immediate set (Oak)

Cc: Oak Zeng <oak.zeng@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Oak Zeng <oak.zeng@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-2-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_vm.c