drm/xe: Pick correct userptr VMA to repin on REMAP op failure
authorMatthew Brost <matthew.brost@intel.com>
Thu, 1 Feb 2024 00:48:49 +0000 (16:48 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Fri, 2 Feb 2024 14:55:09 +0000 (06:55 -0800)
commit447f74d223b4f6cbab74963bf1099050c15374ce
tree34ac223233354db3979c197a61526aa0fc33d813
parenta856b67a84169e065ebbeee50258936b1eacc9eb
drm/xe: Pick correct userptr VMA to repin on REMAP op failure

A REMAP op is composed of 3 VMA's - unmap, prev map, and next map. When
op_execute fails with -EAGAIN we need to update the local VMA pointer to
the current op state and then repin the VMA if it is a userptr.

Fixes a failure seen in xe_vm.munmap-style-unbind-userptr-one-partial.

Fixes: b06d47be7c83 ("drm/xe: Port Xe to GPUVA")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240201004849.2219558-3-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_vm.c