All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"Natalie Vock" <natalie.vock@gmx.de>,
	"Shetaia, Amir" <Amir.Shetaia@amd.com>,
	"Marek Olšák" <maraeo@gmail.com>,
	"Limonciello, Mario" <Mario.Limonciello@amd.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"Lazar, Lijo" <Lijo.Lazar@amd.com>,
	"He, Siwei" <Siwei.He@amd.com>,
	"Yang, Philip" <Philip.Yang@amd.com>,
	"Mukul Joshi" <mukul.joshi@amd.com>
Subject: Re: [PATCH 11/14] drm/amdgpu/ih6.0: Use MMIO ACK for retry CAM on IH 6.0
Date: Thu, 16 Jul 2026 00:54:39 +0200	[thread overview]
Message-ID: <rlm5QnfMQUCvU4htjptxTw@gmail.com> (raw)
In-Reply-To: <51657a60-6f2b-484e-a0a6-f0bdd6e2eee7@amd.com>

On Monday, July 6, 2026 11:27:50 PM Central European Summer Time Mukul Joshi 
wrote:
> Hi Timur,
> 
> For Navi3x, please make the similar change as I suggested for Navi4x to
> enable the doorbell path along with your
> existing changes and use doorbell to clear the CAM entries.
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c
> b/drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c
> index f89e5f40e1a5..a66e3073aed8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c
> @@ -199,7 +199,7 @@ static void nbio_v4_3_ih_doorbell_range(struct
> amdgpu_device *adev,
>                  ih_doorbell_range = REG_SET_FIELD(ih_doorbell_range,
> S2A_DOORBELL_ENTRY_1_CTRL,
> S2A_DOORBELL_PORT1_RANGE_SIZE,
> -                                                 2);
> +                                                 8);
>                  ih_doorbell_range = REG_SET_FIELD(ih_doorbell_range,
> 
> Please let us know how it goes.
> 
> Thanks and regards,
> 
> Mukul

Hi Mukul,

Sorry for the late reply.

I've now tested this on Navi 31 and with this change the doorbell works 
correctly for the retry CAM. I will test the same on Navi 48 next week. If it 
works well then I will drop the patches that use the MMIO register and I'm fine 
using the doorbell.

Thanks & best regards,
Timur

> 
> On 7/6/2026 2:04 PM, Joshi, Mukul wrote:
> > AMD General
> > 
> >> -----Original Message-----
> >> From: Timur Kristóf<timur.kristof@gmail.com>
> >> Sent: Friday, July 3, 2026 2:47 PM
> >> To:amd-gfx@lists.freedesktop.org; Deucher, Alexander
> >> <Alexander.Deucher@amd.com>; Koenig, Christian
> >> <Christian.Koenig@amd.com>; Natalie Vock<natalie.vock@gmx.de>; Shetaia,
> >> Amir<Amir.Shetaia@amd.com>; Marek Olšák<maraeo@gmail.com>;
> >> Limonciello, Mario<Mario.Limonciello@amd.com>; Tvrtko Ursulin
> >> <tursulin@ursulin.net>; Kuehling, Felix<Felix.Kuehling@amd.com>; Lazar,
> >> Lijo <Lijo.Lazar@amd.com>; He, Siwei<Siwei.He@amd.com>; Yang, Philip
> >> <Philip.Yang@amd.com>; Joshi, Mukul<Mukul.Joshi@amd.com>
> >> Subject: Re: [PATCH 11/14] drm/amdgpu/ih6.0: Use MMIO ACK for retry
> >> CAM on IH 6.0
> >> 
> >> On 2026. július 3., péntek 19:46:03 közép-európai nyári idő Joshi, Mukul
> >> 
> >> wrote:
> >>> AMD General
> >>> 
> >>>> -----Original Message-----
> >>>> From: Timur Kristóf<timur.kristof@gmail.com>
> >>>> Sent: Wednesday, July 1, 2026 12:17 PM
> >>>> To:amd-gfx@lists.freedesktop.org; Deucher, Alexander
> >>>> <Alexander.Deucher@amd.com>; Koenig, Christian
> >>>> <Christian.Koenig@amd.com>; Natalie Vock<natalie.vock@gmx.de>;
> >>>> Shetaia, Amir<Amir.Shetaia@amd.com>; Marek Olšák
> >>>> <maraeo@gmail.com>; Limonciello, Mario<Mario.Limonciello@amd.com>;
> >>>> Tvrtko Ursulin<tursulin@ursulin.net>; Kuehling, Felix
> >>>> <Felix.Kuehling@amd.com>; Lazar, Lijo
> >>> 
> >>> <Lijo.Lazar@amd.com>; He, Siwei<Siwei.He@amd.com>; Yang, Philip
> >>> 
> >>>> <Philip.Yang@amd.com>; Joshi, Mukul<Mukul.Joshi@amd.com>
> >>>> Cc: Timur Kristóf<timur.kristof@gmail.com>
> >>>> Subject: [PATCH 11/14] drm/amdgpu/ih6.0: Use MMIO ACK for retry CAM
> >>>> on IH
> >>>> 6.0
> >>>> 
> >>>> 
> >>>> 
> >>>> The doorbell is not working on Navi 31.
> >>>> Use the IH_RETRY_CAM_ACK register.
> >> 
> >> Hi Mukul,
> >> 
> >>> I think the doorbell path is not enabled for IH CAM so that’s probably
> >>> the reason its not working.
> >>> I think we need an update to the NBIO
> >>> ih_doorbell_range() function to enable the doorbell path.
> > 
> > Hi Timur,
> > 
> >> Can you please be more specific and elaborate on what we need to do on
> >> the
> >> NBIO
> >> ih_doorbell_range() function?
> > 
> > Through NBIO, we route the doorbell to the correct HW block.
> > That is currently not enabled/done for the IH CAM doorbell.
> > So, you basically need to enable it inside ih_doorbell_range() function.
> > 
> >> Also, can you say which NBIO version is used
> >> for for Navi 3 and Navi 4 GPUs?
> > 
> > Navi3 --> NBIO v4.3 (nbio_v4_3.c)
> > Navi4 --> NBIO v6.3.1 (nbif_v6_3_1.c)
> > 
> > I am working on the change that you need to enable the doorbell path for
> > Navi4x first. Once that is working, I can send you a test patch for
> > enabling it on Navi3x.
> > 
> > Regards,
> > Mukul
> > 
> >>> Having said that, we intend to use doorbells on all ASICs to ack IH
> >>> CAMs that support retry faults.
> >> 
> >> I'm OK with that, if the doorbell really works on these GPUs.
> >> 
> >> Thanks & best regards,
> >> Timur
> >> 
> >>>> Signed-off-by: Timur Kristóf<timur.kristof@gmail.com>
> >>>> ---
> >>>> 
> >>>>   drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 8 +++++++-
> >>>>   1 file changed, 7 insertions(+), 1 deletion(-)
> >>>> 
> >>>> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> >>>> b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> >>>> index 65e5d21753f9..a97c85b0cb99 100644
> >>>> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> >>>> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> >>>> @@ -307,6 +307,11 @@ static int ih_v6_0_enable_ring(struct
> >>>> amdgpu_device *adev,
> >>>> 
> >>>>        return 0;
> >>>>   
> >>>>   }
> >>>> 
> >>>> +static void ih_v6_0_retry_cam_ack(struct amdgpu_device *adev, u32
> >>>> +cam_index) {
> >>>> +     WREG32_SOC15(OSSSYS, 0, regIH_RETRY_CAM_ACK, cam_index); }
> >>>> +
> >>>> 
> >>>>   /**
> >>>>   
> >>>>    * ih_v6_0_irq_init - init and enable the interrupt ring
> >>>>    *
> >>>> 
> >>>> @@ -807,7 +812,8 @@ static const struct amdgpu_ih_funcs
> >>>> ih_v6_0_funcs = {
> >>>> 
> >>>>        .get_wptr = ih_v6_0_get_wptr,
> >>>>        .decode_iv = amdgpu_ih_decode_iv_helper,
> >>>>        .decode_iv_ts = amdgpu_ih_decode_iv_ts_helper,
> >>>> 
> >>>> -     .set_rptr = ih_v6_0_set_rptr
> >>>> +     .set_rptr = ih_v6_0_set_rptr,
> >>>> +     .retry_cam_ack = ih_v6_0_retry_cam_ack,
> >>>> 
> >>>>   };
> >>>>   
> >>>>   
> >>>>   
> >>>>   static void ih_v6_0_set_interrupt_funcs(struct amdgpu_device *adev)
> >>>> 
> >>>> --
> >>>> 2.54.0





  reply	other threads:[~2026-07-15 22:54 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 16:17 [PATCH 00/14] drm/amdgpu: Improve retry fault handling (v3) Timur Kristóf
2026-07-01 16:17 ` [PATCH 01/14] drm/amdgpu: Respect noretry flag for retry faults on GFX12.1 Timur Kristóf
2026-07-02  7:58   ` Christian König
2026-07-01 16:17 ` [PATCH 02/14] drm/amdgpu/gfxhub: Enable retry fault interrupts when needed Timur Kristóf
2026-07-02  8:10   ` Christian König
2026-07-02  9:14     ` Timur Kristóf
2026-07-02 12:02       ` Christian König
2026-07-15 22:51         ` Timur Kristóf
2026-07-01 16:17 ` [PATCH 03/14] drm/amdgpu/ih: Don't perturb HW registers when accessing soft IH ring Timur Kristóf
2026-07-02  8:10   ` Christian König
2026-07-01 16:17 ` [PATCH 04/14] drm/amdgpu/ih: Add retry_cam_ack IH function pointer Timur Kristóf
2026-07-02  8:12   ` Christian König
2026-07-01 16:17 ` [PATCH 05/14] drm/amdgpu/ih6.1: Use IH_SW_RING_SIZE for soft IH ring instead of PAGE_SIZE Timur Kristóf
2026-07-02  8:13   ` Christian König
2026-07-01 16:17 ` [PATCH 06/14] drm/amdgpu/ih7.0: " Timur Kristóf
2026-07-02 10:15   ` Christian König
2026-07-01 16:17 ` [PATCH 07/14] drm/amdgpu/gmc11: Pass cam_index to retry fault handler Timur Kristóf
2026-07-02 10:17   ` Christian König
2026-07-01 16:17 ` [PATCH 08/14] drm/amdgpu/gmc12: " Timur Kristóf
2026-07-02 10:18   ` Christian König
2026-07-01 16:17 ` [PATCH 09/14] drm/amdgpu/gmc12: Use AMDGPU_PTE_IS_PTE flag for init_pte_flags on GFX12.0 Timur Kristóf
2026-07-02 10:19   ` Christian König
2026-07-01 16:17 ` [PATCH 10/14] drm/amdgpu/vm: Use init PTE flags and NOALLOC in amdgpu_vm_handle_fault() Timur Kristóf
2026-07-02 10:22   ` Christian König
2026-07-02 11:28     ` Timur Kristóf
2026-07-02 12:18       ` Christian König
2026-07-02 12:58         ` Timur Kristóf
2026-07-01 16:17 ` [PATCH 11/14] drm/amdgpu/ih6.0: Use MMIO ACK for retry CAM on IH 6.0 Timur Kristóf
2026-07-02 10:23   ` Christian König
2026-07-02 11:52     ` Timur Kristóf
2026-07-03 18:11     ` Joshi, Mukul
2026-07-03 18:50       ` Timur Kristóf
2026-07-07  8:25         ` Lazar, Lijo
2026-07-15 22:55           ` Timur Kristóf
2026-07-03 18:45     ` Kuehling, Felix
2026-07-03 17:46   ` Joshi, Mukul
2026-07-03 18:46     ` Timur Kristóf
2026-07-06 15:28       ` Alex Deucher
2026-07-06 18:04       ` Joshi, Mukul
2026-07-06 21:27         ` Mukul Joshi
2026-07-15 22:54           ` Timur Kristóf [this message]
2026-07-01 16:17 ` [PATCH 12/14] drm/amdgpu/ih7.0: Use MMIO ACK instead of doorbell for retry CAM on IH 7.0 Timur Kristóf
2026-07-02 10:24   ` Christian König
2026-07-03 16:31   ` Joshi, Mukul
2026-07-03 18:41     ` Timur Kristóf
2026-07-06 17:48       ` Joshi, Mukul
2026-07-06 19:03         ` Mukul Joshi
2026-07-01 16:17 ` [PATCH 13/14] drm/amdgpu/ih6.0: Enable retry CAM on Navi 3 dGPUs Timur Kristóf
2026-07-02 10:35   ` Christian König
2026-07-01 16:17 ` [PATCH 14/14] drm/amdgpu/ih7.0: Enable retry CAM on Navi 4 dGPUs Timur Kristóf
2026-07-02 10:38   ` Christian König
2026-07-02 11:53     ` Timur Kristóf
2026-07-02 12:30       ` Christian König
2026-07-02 12:47         ` Timur Kristóf
2026-07-02 13:26         ` Alex Deucher

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=rlm5QnfMQUCvU4htjptxTw@gmail.com \
    --to=timur.kristof@gmail.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Amir.Shetaia@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Lijo.Lazar@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Philip.Yang@amd.com \
    --cc=Siwei.He@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=maraeo@gmail.com \
    --cc=mukul.joshi@amd.com \
    --cc=natalie.vock@gmx.de \
    --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.