AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Consolidate and fix root PD fence resverations
@ 2026-11-18 19:07 Benjamin Cheng
  2026-11-18 19:07 ` [PATCH v2 01/10] drm/amdkfd: reserve TTM move fences Benjamin Cheng
                   ` (10 more replies)
  0 siblings, 11 replies; 21+ messages in thread
From: Benjamin Cheng @ 2026-11-18 19:07 UTC (permalink / raw)
  To: Alex Deucher, Christian König, amd-gfx
  Cc: Pierre-Eric Pelloux-Prayer, Shahyan Soltani, Benjamin Cheng

In [1] I originally wanted to just stop using amdgpu_bo_fence. However
while attempting to address Christian's comment about reserving the
fences upfront when the PD is locked, I realized that there are many
places that are not reserving enough fences in the worst-case.

I went through and audited every lock of the VM root PD and I think I
have caught everything missing fence reservations in this series. I
have lightly tested this and didn't see any issues, and in general
this is reserving more fences than the typical case so it shouldn't
cause any BUG_ONs.

Patch 1 is mostly an independent fix. It is not related to the VM root
PD, but follows almost the same logic as patch 2 through 5 below.

Patch 2 through 5 here are the reservation fixes. Basically since we
started enabling more clear/move entities to be used, we should be
reserving the worst-case space upfront. Also when the TLB flush fence
was added we did not add reserve space for it.

Patch 6 and 7 are cleanups that I found (not everywhere locking the PD
does validation or VM updates), and patches 8 through 10 are the
amdgpu_bo_fence() removal series from [1].

[1]: https://lore.kernel.org/amd-gfx/20261112164408.1748006-1-benjamin.cheng@amd.com/

Benjamin Cheng (10):
  drm/amdkfd: reserve TTM move fences
  drm/amdgpu/gem: reserve fences on the VM root PD
  drm/amdgpu/vm: reserve more fences in amdgpu_vm_lock_pd
  drm/amdgpu/dma_buf: reserve AMDGPU_VM_UPDATE_FENCES for move_notify
  drm/amdgpu/vm: reserve AMDGPU_VM_UPDATE_FENCES for handle_fault
  drm/amdgpu: reserve only what the caller asks for in lock_pd
  drm/amdgpu/userq: remove extra fence request when locking PD
  drm/amdgpu/vm: stop using amdgpu_bo_fence
  drm/amdgpu/uvd: stop using amdgpu_bo_fence
  drm/amdgpu/object: get rid of amdgpu_bo_fence

 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  | 16 +++++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |  3 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c       | 13 ++++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c    | 25 -------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h    |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c    | 12 +++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c     |  6 ++---
 .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c       | 17 ++++++++++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c        | 14 ++++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h        |  8 ++++++
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c    |  2 +-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c          |  3 ++-
 14 files changed, 68 insertions(+), 57 deletions(-)

-- 
2.56.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-11-19 14:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 19:07 [PATCH v2 00/10] Consolidate and fix root PD fence resverations Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 01/10] drm/amdkfd: reserve TTM move fences Benjamin Cheng
2026-11-19 13:53   ` Christian König
2026-11-18 19:07 ` [PATCH v2 02/10] drm/amdgpu/gem: reserve fences on the VM root PD Benjamin Cheng
2026-11-19 13:58   ` Christian König
2026-11-18 19:07 ` [PATCH v2 03/10] drm/amdgpu/vm: reserve more fences in amdgpu_vm_lock_pd Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 04/10] drm/amdgpu/dma_buf: reserve AMDGPU_VM_UPDATE_FENCES for move_notify Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 05/10] drm/amdgpu/vm: reserve AMDGPU_VM_UPDATE_FENCES for handle_fault Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 06/10] drm/amdgpu: reserve only what the caller asks for in lock_pd Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 07/10] drm/amdgpu/userq: remove extra fence request when locking PD Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 08/10] drm/amdgpu/vm: stop using amdgpu_bo_fence Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 09/10] drm/amdgpu/uvd: " Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 10/10] drm/amdgpu/object: get rid of amdgpu_bo_fence Benjamin Cheng
2026-11-18 19:29   ` sashiko-bot
2026-11-19 14:40 ` [PATCH v3 1/7] drm/amdkfd: reserve TTM move fences Benjamin Cheng
2026-11-19 14:40   ` [PATCH v3 2/7] drm/amdgpu/gem: reserve fences on the VM root PD Benjamin Cheng
2026-11-19 14:40   ` [PATCH v3 3/7] drm/amdgpu/vm: reserve TTM_NUM_MOVE_FENCES in amdgpu_vm_lock_pd Benjamin Cheng
2026-11-19 14:40   ` [PATCH v3 4/7] drm/amdgpu/vm: reserve space for last_unlocked in handle_fault Benjamin Cheng
2026-11-19 14:40   ` [PATCH v3 5/7] drm/amdgpu/vm: stop using amdgpu_bo_fence Benjamin Cheng
2026-11-19 14:40   ` [PATCH v3 6/7] drm/amdgpu/uvd: " Benjamin Cheng
2026-11-19 14:40   ` [PATCH v3 7/7] drm/amdgpu/object: get rid of amdgpu_bo_fence Benjamin Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox