AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org, Alexander.Deucher@amd.com,
	"Christian König" <christian.koenig@amd.com>,
	"Natalie Vock" <natalie.vock@gmx.de>,
	"Amir Shetaia" <Amir.Shetaia@amd.com>,
	"Marek Olšák" <maraeo@gmail.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>,
	"Felix Kuehling" <Felix.Kuehling@amd.com>,
	"Lijo Lazar" <lijo.lazar@amd.com>, "Siwei He" <siwei.he@amd.com>,
	"Philip Yang" <philip.yang@amd.com>,
	"Mukul Joshi" <mukul.joshi@amd.com>
Cc: "Timur Kristóf" <timur.kristof@gmail.com>
Subject: [PATCH 00/11] drm/amdgpu: Improve retry fault handling (v4)
Date: Fri, 28 Aug 2026 13:41:02 +0200	[thread overview]
Message-ID: <20260828114113.13523-1-timur.kristof@gmail.com> (raw)

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!

Changes in v4:

* Program ENABLE_RETRY_FAULT_INTERRUPT bit to 1
  and not according to the gmc.noretry flag,
  as requested by Alex and Christian.
* Applied Mukul's suggestion to use the doorbell
  for the IH retry CAM instead of the MMIO ACK.
* Dropped patch that enabled the retry CAM MMIO ACK.
* Dropped NOALLOC PTE flag as requested by Christian.

Timur Kristóf (11):
  drm/amdgpu: Respect noretry flag for retry faults on GFX12.1
  drm/amdgpu/gfxhub: Enable retry fault interrupts in
    L2_PROTECTION_FAULT_CNTL2
  drm/amdgpu/ih: Don't perturb HW registers when accessing soft IH ring
  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 in amdgpu_vm_handle_fault()
  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_vm.c      |  6 ++--
 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   |  2 +-
 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      |  7 ++++-
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c        | 32 +++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/ih_v6_1.c        |  9 +++++-
 drivers/gpu/drm/amd/amdgpu/ih_v7_0.c        | 15 ++++++----
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c      |  4 +++
 drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c    |  2 +-
 drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c      |  2 +-
 18 files changed, 121 insertions(+), 28 deletions(-)

-- 
2.55.0


             reply	other threads:[~2026-08-28 11:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 11:41 Timur Kristóf [this message]
2026-08-28 11:41 ` [PATCH 01/11] drm/amdgpu: Respect noretry flag for retry faults on GFX12.1 Timur Kristóf
2026-08-28 15:47   ` Alex Deucher
2026-08-28 11:41 ` [PATCH 02/11] drm/amdgpu/gfxhub: Enable retry fault interrupts in L2_PROTECTION_FAULT_CNTL2 Timur Kristóf
2026-08-28 11:41 ` [PATCH 03/11] drm/amdgpu/ih: Don't perturb HW registers when accessing soft IH ring Timur Kristóf
2026-08-28 11:41 ` [PATCH 04/11] drm/amdgpu/ih6.1: Use IH_SW_RING_SIZE for soft IH ring instead of PAGE_SIZE Timur Kristóf
2026-08-28 11:41 ` [PATCH 05/11] drm/amdgpu/ih7.0: " Timur Kristóf
2026-08-28 11:41 ` [PATCH 06/11] drm/amdgpu/gmc11: Pass cam_index to retry fault handler Timur Kristóf
2026-08-28 11:41 ` [PATCH 07/11] drm/amdgpu/gmc12: " Timur Kristóf
2026-08-28 11:41 ` [PATCH 08/11] drm/amdgpu/gmc12: Use AMDGPU_PTE_IS_PTE flag for init_pte_flags on GFX12.0 Timur Kristóf
2026-08-28 11:41 ` [PATCH 09/11] drm/amdgpu/vm: Use init PTE flags in amdgpu_vm_handle_fault() Timur Kristóf
2026-08-28 11:41 ` [PATCH 10/11] drm/amdgpu/ih6.0: Enable retry CAM on Navi 3 dGPUs Timur Kristóf
2026-08-28 11:41 ` [PATCH 11/11] drm/amdgpu/ih7.0: Enable retry CAM on Navi 4 dGPUs Timur Kristóf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260828114113.13523-1-timur.kristof@gmail.com \
    --to=timur.kristof@gmail.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Amir.Shetaia@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=lijo.lazar@amd.com \
    --cc=maraeo@gmail.com \
    --cc=mario.limonciello@amd.com \
    --cc=mukul.joshi@amd.com \
    --cc=natalie.vock@gmx.de \
    --cc=philip.yang@amd.com \
    --cc=siwei.he@amd.com \
    --cc=tursulin@ursulin.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox