Commit 5cc33255 authored by Thomas Hellström's avatar Thomas Hellström
Browse files

drm/xe: Rework eviction rejection of bound external bos



For preempt_fence mode VM's we're rejecting eviction of
shared bos during VM_BIND. However, since we do this in the
move() callback, we're getting an eviction failure warning from
TTM. The TTM callback intended for these things is
eviction_valuable().

However, the latter doesn't pass in the struct ttm_operation_ctx
needed to determine whether the caller needs this.

Instead, attach the needed information to the vm under the
vm->resv, until we've been able to update TTM to provide the
needed information. And add sufficient lockdep checks to prevent
misuse and races.

v2:
- Fix a copy-paste error in xe_vm_clear_validating()
v3:
- Fix kerneldoc errors.

Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Fixes: 0af944f0 ("drm/xe: Reject BO eviction if BO is bound to current VM")
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250528164105.234718-1-thomas.hellstrom@linux.intel.com


(cherry picked from commit 9d555864)
Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
parent 2182f358
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment