Skip to content

drm/xe: Userptr update

Thomas Hellström requested to merge thomash/kernel:userptr_update into xe

This started out trying to fix issue #130 (closed) by grabbing the userptr notifier_lock across page-table updates. That turned out to be a little involved, but worked out and that means we now can Zap fault mode PTEs under userptr seqlock in write mode, so no need to keep the usm leaves anymore, those are ditched.

PVC testing in fault mode hasn't been done, but I've tried to enable the pte zapper without fault mode and it appears to work as expected but of course we don't see any faults since relevant engines are all idle at that point.

Finally checking for userptr invalidations is made O(1) in the last commit, based on the same algorithm used in i915.

v2:

  • Fix review comments by Matthew Brost.
  • Update the -EAGAIN handling at binding so that it actually repins userptrs at binding, rebind worker and exec.
  • Update the -EAGAIN injection so that it puts the userptr on the invalidated list for rebinding.

v3:

  • Updated the preempt fence handling to behave more like the original one, but with the split. Also now we check for userptr invalidation before installing preempt fences so it should now be safe to remove the resume_go variable completely.

v4:

  • Fixed some kerneldoc warnings.
Edited by Thomas Hellström

Merge request reports