On completion of i915_vma_pin_ww(), a synchronous variant of
dma_fence_work_commit() is called. When pinning a VMA to GGTT address
space on a Cherry View family processor, or on a Broxton generation SoC
with VTD enabled, i.e., when stop_machine() is then called from
intel_ggtt_bind_vma(), that can potentially lead to lock inversion among
reservation_ww and cpu_hotplug locks.
Call asynchronous variant of dma_fence_work_commit() in that case. With
that in place, adjust two selftest affected by that change.
v3: Provide more verbose in-line comment (Andi; 1/3, 2/3),
- mention target environments in commit message (1/3).
v2: Fix spelling (Sebastian, Krzysztof; 2/3),
- explain why VMA pinning is commited asynchronously on CHV/BXT+VTD
(Krzysztof; 2/3, 3/3),
- use more precise wording in commit description (3/3).
Janusz Krzysztofik (3):
drm/i915: Avoid lock inversion when pinning to GGTT on CHV/BXT+VTD
drm/i915: Wait longer for threads in migrate selftest on CHV/BXT+VTD
drm/i915: Wait for page_sizes_gtt in gtt selftest on CHV/BXT+VTD
drivers/gpu/drm/i915/gt/selftest_migrate.c | 9 ++++++++-
drivers/gpu/drm/i915/i915_vma.c | 16 ++++++++++++++--
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 ++++
3 files changed, 26 insertions(+), 3 deletions(-)
Cc: Sebastian Brzezinka <[email protected]>
Cc: Krzysztof Karas <[email protected]>
Cc: Andi Shyti <[email protected]>
--
2.51.0