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>,
"Siwei He" <siwei.he@amd.com>,
"Philip Yang" <philip.yang@amd.com>,
"Mukul Joshi" <mukul.joshi@amd.com>,
"Tvrtko Ursulin" <tursulin@ursulin.net>
Subject: Re: [PATCH 5/7] drm/amdgpu/gmc12.0: Use AMDGPU_PTE_IS_PTE flag for init_pte_flags on GFX12.0
Date: Wed, 24 Jun 2026 17:30:42 +0200 [thread overview]
Message-ID: <2128479.Jadu78ljVU@timur-max> (raw)
In-Reply-To: <3e09e693-5494-49e7-8aaa-2338867991f5@ursulin.net>
On 2026. június 24., szerda 16:54:04 közép-európai nyári idő Tvrtko Ursulin
wrote:
> On 29/05/2026 11:30, Timur Kristóf wrote:
> > According to some SVM code this flag is necessary on
> > also GFX12.0 not just GFX12.1.
> >
> > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> > ---
> >
> > drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
> > b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index
> > 586703ec0dfa0..7bbf5f848ce1b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
> > @@ -641,11 +641,12 @@ static int gmc_v12_0_early_init(struct
> > amdgpu_ip_block *ip_block)>
> > adev->gmc.xgmi.connected_to_cpu =
> >
> > adev->smuio.funcs-
>is_host_gpu_xgmi_supported(adev);
> >
> > + adev->gmc.init_pte_flags = AMDGPU_PTE_IS_PTE;
> > +
> >
> > switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
> >
> > case IP_VERSION(12, 1, 0):
> > gmc_v12_1_set_gmc_funcs(adev);
> > gmc_v12_1_set_irq_funcs(adev);
> >
> > - adev->gmc.init_pte_flags = AMDGPU_PTE_IS_PTE;
> >
> > break;
> >
> > default:
> > gmc_v12_0_set_gmc_funcs(adev);
>
> Code is fine but I don't have the inside knowledge to comment on the
> GFX12.0 vs GFX12.1 situation. Where is this SVM code commit message
> mentions?
Hi,
amdgpu_vm_pte_update_flags() has the following comment:
/* Workaround for fault priority problem on GMC9 and GFX12,
* EXECUTABLE for GMC9 fault priority and init_pte_flags
* (e.g. AMDGPU_PTE_IS_PTE on GFX12)
*/
svm_range_get_pte_flags() unconditionally uses this PTE flag on GFX12.x, added
by this commit: a8a4615ba0fa3ee1248ae2184e7e848d7b644e70
which says: "This resolves the issues related to SVM enablement in GFX12."
While they don't elaborate what exactly the problem is that is being worked
around, it is pretty clear that the flag is necessary for proper fault handling
on GFX12.x and indeed I can confirm that it solves the problem for me. I think
the reason why it was missing here is because the authors just fixed the issue
for SVM and forgot to fix it also for graphics.
Timur
>
> Otherwise, maybe people who added this workaround could review? Those
> two are the relevant patches AFAICT:
>
> commit db29ddf6505f3e831e000c95ae013b18a37f70bc
> Author: Mukul Joshi <mukul.joshi@amd.com>
> Date: Thu Apr 24 21:51:23 2025 -0400
>
> drm/amdgpu: Add per-ASIC PTE init flag
>
>
> commit 9d47b2c36b9a6c6b844c33cab407a5d7ad102234
> Author: Siwei He <siwei.he@amd.com>
> Date: Tue Apr 14 14:46:54 2026 -0400
>
> drm/amdgpu: OR init_pte_flags into invalid leaf PTE update
>
> I took the liberty to add some CCs.
>
> Regards,
>
> Tvrtko
next prev parent reply other threads:[~2026-06-24 15:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 10:30 [PATCH 0/7] drm/amdgpu: Implement retry faults on Navi 4 Timur Kristóf
2026-05-29 10:30 ` [PATCH 1/7] drm/amdgpu/vm: Add fence argument to amdgpu_vm_handle_fault() Timur Kristóf
2026-06-24 13:54 ` Tvrtko Ursulin
2026-06-24 14:09 ` Timur Kristóf
2026-05-29 10:30 ` [PATCH 2/7] drm/amdgpu: ACK the retry CAM after VM update finishes Timur Kristóf
2026-06-24 14:31 ` Tvrtko Ursulin
2026-06-24 14:52 ` Timur Kristóf
2026-06-24 15:14 ` Tvrtko Ursulin
2026-06-24 15:42 ` Timur Kristóf
2026-06-24 15:52 ` Tvrtko Ursulin
2026-05-29 10:30 ` [PATCH 3/7] drm/amdgpu/ih7.0: Use MMIO ACK instead of doorbell for retry CAM on IH 7.0 Timur Kristóf
2026-05-29 10:30 ` [PATCH 4/7] drm/amdgpu/ih7.0: Use IH_SW_RING_SIZE for soft IH ring instead of PAGE_SIZE Timur Kristóf
2026-06-24 14:37 ` Tvrtko Ursulin
2026-06-24 15:16 ` Timur Kristóf
2026-05-29 10:30 ` [PATCH 5/7] drm/amdgpu/gmc12.0: Use AMDGPU_PTE_IS_PTE flag for init_pte_flags on GFX12.0 Timur Kristóf
2026-06-24 14:54 ` Tvrtko Ursulin
2026-06-24 15:30 ` Timur Kristóf [this message]
2026-05-29 10:30 ` [PATCH 6/7] drm/amdgpu/vm: Use init PTE flags, and NOALLOC in amdgpu_vm_handle_fault() Timur Kristóf
2026-06-24 14:56 ` Tvrtko Ursulin
2026-05-29 10:30 ` [PATCH 7/7] drm/amdgpu/gmc12: Pass cam_index to retry fault handler Timur Kristóf
2026-06-24 14:59 ` Tvrtko Ursulin
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=2128479.Jadu78ljVU@timur-max \
--to=timur.kristof@gmail.com \
--cc=Alexander.Deucher@amd.com \
--cc=Amir.Shetaia@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.