Skip to content

drm/amdgpu: Improve retry fault handling (v3)

Timur Kristóf amd-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 42 repliesIn review

Changes in v2 from the cover letter

* Reordered patches in the series to put bug fixes first
* Enable retry fault interrupt in init_system_aperture_regs() instead of in set_fault_enable_default()
* Added a patch to respect the noretry flag on GFX12.1 too

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14drm/amdgpu: Respect noretry flag for retry faults on GFX12.1drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c drivers/gpu/drm/amd/amdgpu/mmhub_v4_2_0.c+3 -31 reply
2/14drm/amdgpu/gfxhub: Enable retry fault interrupts when neededdrivers/gpu/drm/amd/amdgpu/gfxhub_v11_5_0.c drivers/gpu/drm/amd/amdgpu/gfxhub_v12_0.c drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +5 more+51 -145 replies
3/14drm/amdgpu/ih: Don't perturb HW registers when accessing soft IH ringdrivers/gpu/drm/amd/amdgpu/ih_v6_0.c drivers/gpu/drm/amd/amdgpu/ih_v6_1.c drivers/gpu/drm/amd/amdgpu/ih_v7_0.c +1 more+25 -01 reply
4/14drm/amdgpu/ih: Add retry_cam_ack IH function pointerdrivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h drivers/gpu/drm/amd/amdgpu/ih_v7_0.c +1 more+20 -21 reply
5/14drm/amdgpu/ih6.1: Use IH_SW_RING_SIZE for soft IH ring instead of PAGE_SIZEdrivers/gpu/drm/amd/amdgpu/ih_v6_1.c+1 -11 reply
6/14drm/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 -41 reply
7/14drm/amdgpu/gmc11: Pass cam_index to retry fault handlerdrivers/gpu/drm/amd/amdgpu/gmc_v11_0.c+4 -11 reply
8/14drm/amdgpu/gmc12: Pass cam_index to retry fault handlerdrivers/gpu/drm/amd/amdgpu/gmc_v12_0.c+4 -11 reply
9/14drm/amdgpu/gmc12: Use AMDGPU_PTE_IS_PTE flag for init_pte_flags on GFX12.0drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c+2 -11 reply
10/14drm/amdgpu/vm: Use init PTE flags and NOALLOC in amdgpu_vm_handle_fault()drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+6 -24 replies
11/14drm/amdgpu/ih6.0: Use MMIO ACK for retry CAM on IH 6.0drivers/gpu/drm/amd/amdgpu/ih_v6_0.c+7 -114 replies
12/14drm/amdgpu/ih7.0: Use MMIO ACK instead of doorbell for retry CAM on IH 7.0drivers/gpu/drm/amd/amdgpu/ih_v7_0.c+1 -165 replies
13/14drm/amdgpu/ih6.0: Enable retry CAM on Navi 3 dGPUsdrivers/gpu/drm/amd/amdgpu/ih_v6_0.c+10 -01 reply
14/14drm/amdgpu/ih7.0: Enable retry CAM on Navi 4 dGPUsdrivers/gpu/drm/amd/amdgpu/ih_v7_0.c+2 -15 replies

Reviews trailers per patch

10 of 14 patches have a Reviewed-by or Acked-by.

PatchTvrtko UrsulinChristian König
1/14R-b
2/14
3/14R-b R-b
4/14R-b
5/14R-b R-b
6/14R-b R-b
7/14
8/14R-b
9/14R-b
10/14
11/14A-b
12/14A-b
13/14R-b
14/14

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 00/14] drm/amdgpu: Improve retry fault handling (v3)

With this series, the kernel is able to mitigate most page faults on Navi 3 and 4 without causing a hang and without a need to reset the GPU, when the amdgpu.noretry=0 module parameter is set.

Fix various issues with retry fault handling.

Enable filter CAM on Navi 3 and 4 which is a HW block that filters the repeated page fault interrupts that happen when retry faults are enabled, making the handling more efficient.

Changes in v2:

* Reordered patches in the series to put bug fixes first
* Enable retry fault interrupt in init_system_aperture_regs() instead of in set_fault_enable_default()
* Added a patch to respect the noretry flag on GFX12.1 too

Changes in v3:

* This series now includes fixes for Navi 4 too which were previously submitted in a separate series.
* Dropped patch that improved handling of timestamps on the page fault interrupts. I'll come up with a different solution for that problem later.
* Dropped patches that solve race condition between retry fault handling and filter CAM ACK because they conflict with Christian's ongoing work. I'll revisit that later.
* Reworked the series into smaller patches for easier reviews.
* Addressed comments from Tvrtko's review. Thank you Tvrtko for taking the time to review!

Timur Kristóf (14):
drm/amdgpu: Respect noretry flag for retry faults on GFX12.1 drm/amdgpu/gfxhub: Enable retry fault interrupts when needed drm/amdgpu/ih: Don't perturb HW registers when accessing soft IH ring drm/amdgpu/ih: Add retry_cam_ack IH function pointer drm/amdgpu/ih6.1: Use IH_SW_RING_SIZE for soft IH ring instead of
PAGE_SIZE
drm/amdgpu/ih7.0: Use IH_SW_RING_SIZE for soft IH ring instead of
PAGE_SIZE
drm/amdgpu/gmc11: Pass cam_index to retry fault handler drm/amdgpu/gmc12: Pass cam_index to retry fault handler drm/amdgpu/gmc12: 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/ih6.0: Use MMIO ACK for retry CAM on IH 6.0
  drm/amdgpu/ih7.0: Use MMIO ACK instead of doorbell for retry CAM on IH
    7.0

drm/amdgpu/ih6.0: Enable retry CAM on Navi 3 dGPUs drm/amdgpu/ih7.0: Enable retry CAM on Navi 4 dGPUs

 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c     |  7 ++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h      |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c      |  8 ++++--
 drivers/gpu/drm/amd/amdgpu/gfxhub_v11_5_0.c |  9 +++++--
 drivers/gpu/drm/amd/amdgpu/gfxhub_v12_0.c   |  9 +++++--
 drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c   |  4 +--
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c    |  9 +++++--
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c    |  2 ++
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c    |  9 +++++--
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c    |  9 +++++--
 drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c    |  9 +++++--
 drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c  |  9 +++++--
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c      |  5 +++-
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c      |  8 ++++--
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c        | 25 ++++++++++++++++-
 drivers/gpu/drm/amd/amdgpu/ih_v6_1.c        |  9 ++++++-
 drivers/gpu/drm/amd/amdgpu/ih_v7_0.c        | 30 +++++++++------------
 drivers/gpu/drm/amd/amdgpu/mmhub_v4_2_0.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c      |  4 +++
 drivers/gpu/drm/amd/amdgpu/vega20_ih.c      |  8 +++++-
 20 files changed, 133 insertions(+), 43 deletions(-)
Signature · 1 line
2.54.0