Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'drm-intel-gt-next-2025-11-14' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

Driver Changes:

Fixes/improvements/new stuff:

- Avoid lock inversion when pinning to GGTT on CHV/BXT+VTD (Janusz Krzysztofik)
- Use standard API for seqcount read in TLB invalidation [gt] (Andi Shyti)

Miscellaneous:

- Wait longer for threads in migrate selftest on CHV/BXT+VTD (Janusz Krzysztofik)
- Wait for page_sizes_gtt in gtt selftest on CHV/BXT+VTD (Janusz Krzysztofik)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Tvrtko Ursulin <tursulin@igalia.com>
Link: https://patch.msgid.link/aRdXOAKlTVX_b0en@linux

+27 -4
+1 -1
drivers/gpu/drm/i915/gt/intel_tlb.h
··· 18 18 19 19 static inline u32 intel_gt_tlb_seqno(const struct intel_gt *gt) 20 20 { 21 - return seqprop_sequence(&gt->tlb.seqno); 21 + return raw_read_seqcount(&gt->tlb.seqno); 22 22 } 23 23 24 24 static inline u32 intel_gt_next_invalidate_tlb_full(const struct intel_gt *gt)
+8 -1
drivers/gpu/drm/i915/gt/selftest_migrate.c
··· 710 710 thread[i].tsk = tsk; 711 711 } 712 712 713 - msleep(10 * n_cpus); /* start all threads before we kthread_stop() */ 713 + /* 714 + * Start all threads before we kthread_stop(). 715 + * In CHV / BXT+VTD environments, where VMA pinning is committed 716 + * asynchronously, empirically determined 100ms delay is needed 717 + * to avoid stopping threads that may still wait for completion of 718 + * intel_ggtt_bind_vma and fail with -ERESTARTSYS when interrupted. 719 + */ 720 + msleep((intel_vm_no_concurrent_access_wa(migrate->context->vm->i915) ? 100 : 10) * n_cpus); 714 721 715 722 for (i = 0; i < n_cpus; ++i) { 716 723 struct task_struct *tsk = thread[i].tsk;
+14 -2
drivers/gpu/drm/i915/i915_vma.c
··· 1597 1597 err_vma_res: 1598 1598 i915_vma_resource_free(vma_res); 1599 1599 err_fence: 1600 - if (work) 1601 - dma_fence_work_commit_imm(&work->base); 1600 + if (work) { 1601 + /* 1602 + * When pinning VMA to GGTT on CHV or BXT with VTD enabled, 1603 + * commit VMA binding asynchronously to avoid risk of lock 1604 + * inversion among reservation_ww locks held here and 1605 + * cpu_hotplug_lock acquired from stop_machine(), which we 1606 + * wrap around GGTT updates when running in those environments. 1607 + */ 1608 + if (i915_vma_is_ggtt(vma) && 1609 + intel_vm_no_concurrent_access_wa(vma->vm->i915)) 1610 + dma_fence_work_commit(&work->base); 1611 + else 1612 + dma_fence_work_commit_imm(&work->base); 1613 + } 1602 1614 err_rpm: 1603 1615 intel_runtime_pm_put(&vma->vm->i915->runtime_pm, wakeref); 1604 1616
+4
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
··· 1118 1118 goto err_put; 1119 1119 } 1120 1120 1121 + /* make sure page_sizes_gtt has been populated before use */ 1122 + if (i915_is_ggtt(vm) && intel_vm_no_concurrent_access_wa(vm->i915)) 1123 + i915_vma_wait_for_bind(vma); 1124 + 1121 1125 expected_vma_size = round_up(size, 1 << (ffs(vma->resource->page_sizes_gtt) - 1)); 1122 1126 expected_node_size = expected_vma_size; 1123 1127