Skip to content

drm/xe: Don't access the vm's rebind list unprotected

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

This merge requests addresses issue #169 (closed).

The first patch plumbs the ttm_operation_ctx through to xe_bo_trigger_rebind. We need the vm member for locking purposes.

The second patch fixes an interruptible wait from the dma_buf move_notify callback, which is possible now that we plumb through the ttm_operation_ctx

The third patch adds missing locks around the manipulation of the vm's rebind list. Where we fail to lock we just fail eviction, and this is addressed in a later patch.

The fourth patch avoids endless validation loops. Note that this patch, as mentioned by @mbrost, might break the -large eviction igts, but we need to address that in a more robust way.

The fifth patch introduces a notifier list protected by a lower level lock than the vm resv, where we put vmas for which we fail to lock the vm's resv. This list is later scooped with the vm's resv held.

v3: -Move some minor changes between commits. End code is the same.

Edited by Thomas Hellström

Merge request reports