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. Janusz Krzysztofik (3): drm/i915: Avoid lock inversion when pinning to GGTT 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 | 3 ++- drivers/gpu/drm/i915/i915_vma.c | 10 ++++++++-- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 ++++ 3 files changed, 14 insertions(+), 3 deletions(-) -- 2.51.0
