]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/xe: Only set xe_vma_op.map fields for GPUVA map operations
authorMatthew Brost <matthew.brost@intel.com>
Mon, 20 Nov 2023 20:08:48 +0000 (12:08 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:44:51 +0000 (11:44 -0500)
commit40709aa761acbc78fe6c0405720d79cbf8345095
tree5e7c11bf31579a6ce05f227c8e87c3414794adac
parent0bc519d20ffa7a450bfa21c644c2de95ae8027dc
drm/xe: Only set xe_vma_op.map fields for GPUVA map operations

DRM_XE_VM_BIND_OP_MAP_* IOCTL operations can result in GPUVA unmap, remap,
or map operations in vm_bind_ioctl_ops_create. The xe_vma_op.map fields
are blindly set which is incorrect for GPUVA unmap or remap operations.
Fix this by only setting xe_vma_op.map for GPUVA map operations. Also
restructure a bit vm_bind_ioctl_ops_create to make the code a bit more
readable.

Reported-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Brian Welty <brian.welty@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_vm.c