Skip to content

drm/amdgpu: Implement retry faults on Navi 4

Timur Kristóf amd-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/amdgpu/vm: Add fence argument to amdgpu_vm_handle_fault()drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +1 more+9 -62 replies
2/7drm/amdgpu: ACK the retry CAM after VM update finishesdrivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 more+36 -45 replies
3/7drm/amdgpu/ih7.0: Use MMIO ACK instead of doorbell for retry CAM on IH 7.0drivers/gpu/drm/amd/amdgpu/ih_v7_0.c+3 -170 replies
4/7drm/amdgpu/ih7.0: Use IH_SW_RING_SIZE for soft IH ring instead of PAGE_SIZEdrivers/gpu/drm/amd/amdgpu/ih_v7_0.c+1 -42 replies
5/7drm/amdgpu/gmc12.0: Use AMDGPU_PTE_IS_PTE flag for init_pte_flags on GFX12.0drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c+2 -12 replies
6/7drm/amdgpu/vm: Use init PTE flags, and NOALLOC in amdgpu_vm_handle_fault()drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+4 -11 reply
7/7drm/amdgpu/gmc12: Pass cam_index to retry fault handlerdrivers/gpu/drm/amd/amdgpu/gmc_v12_0.c+4 -11 reply

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchTvrtko Ursulin
1/7
2/7
3/7
4/7R-b
5/7
6/7
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] drm/amdgpu: Implement retry faults on Navi 4

Implement retry faults on Navi 4 in order to mitigate VM faults. Based on my previous series (required for correct operation):

* Improve retry fault handling (v2)
* Improve soft IH ring

Solve a race condition between the VM update performed by amdgpu_vm_handle_fault() and retry_cam_ack() to make sure the ACK is always done after the VM update.

Adjust soft IH ring size on Navi 4. Note that Navi 4 seems to send the retry fault interrupts on the first IH ring so they end up being dispatched on the soft IH ring.

Adjust the PTE flags to make the VM update work correctly on Navi 4. Without that, the update seems to be stuck in a cache and can't resolve the fault.

Enable the retry CAM on Navi 4 as well in order to filter the retry fault interrupts. Change the IH v7.0 code to use the MMIO based ACK rather than a doorbell. The doorbell seems to just not work at all on Navi 4 just like it also doesn't work Navi 3.

With this series, the kernel is able to mitigate VM faults when amdgpu.noretry=0 is specified on the kernel command line.

Timur Kristóf (7):
drm/amdgpu/vm: Add fence argument to amdgpu_vm_handle_fault() drm/amdgpu: ACK the retry CAM after VM update finishes drm/amdgpu/ih7.0: Use MMIO ACK instead of doorbell for retry CAM on IH

    7.0
  drm/amdgpu/ih7.0: Use IH_SW_RING_SIZE for soft IH ring instead of
    PAGE_SIZE
  drm/amdgpu/gmc12.0: Use AMDGPU_PTE_IS_PTE flag for init_pte_flags on
    GFX12.0

drm/amdgpu/vm: Use init PTE flags, and NOALLOC in
amdgpu_vm_handle_fault()
drm/amdgpu/gmc12: Pass cam_index to retry fault handler

 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c     | 30 ++++++++++++++++++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h     |  8 ++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c      | 10 +++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h      |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c |  2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c      |  8 ++++--
 drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c      |  4 +--
 drivers/gpu/drm/amd/amdgpu/ih_v7_0.c        | 25 +++--------------
 8 files changed, 57 insertions(+), 32 deletions(-)
Signature · 1 line
2.53.0