AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mukul Joshi <mukul.joshi@amd.com>
To: "Timur Kristóf" <timur.kristof@gmail.com>,
	"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>
Subject: Re: [PATCH 12/14] drm/amdgpu/ih7.0: Use MMIO ACK instead of doorbell for retry CAM on IH 7.0
Date: Mon, 6 Jul 2026 15:03:51 -0400	[thread overview]
Message-ID: <b71aed1c-27c9-436f-be89-05e21c9878f2@amd.com> (raw)
In-Reply-To: <BL3PR12MB64257E98740CDB903C4B2BE1EEF12@BL3PR12MB6425.namprd12.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 6113 bytes --]

Hi Timur,
For Navi4x, can you please give this change to enable the doorbell path 
a try in
addition to your changes and use doorbells then to clear the CAM entries:


diff --git a/drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c 
b/drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c
index b6f832c53860..8aefe64fcd41 100644
--- a/drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c
@@ -251,7 +251,7 @@ static void nbif_v6_3_1_ih_doorbell_range(struct 
amdgpu_device *adev,
                 ih_doorbell_range = REG_SET_FIELD(ih_doorbell_range,
GDC_S2A0_S2A_DOORBELL_ENTRY_1_CTRL,
S2A_DOORBELL_PORT1_RANGE_SIZE,
-                                                 2);
+                                                 8);


Please let us know how it goes.


Thanks and regards,
Mukul

On 7/6/2026 1:48 PM, Joshi, Mukul wrote:
> AMD General
>
>> -----Original Message-----
>> From: Timur Kristóf<timur.kristof@gmail.com>
>> Sent: Friday, July 3, 2026 2:41 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 12/14] drm/amdgpu/ih7.0: Use MMIO ACK instead of
>> doorbell for retry CAM on IH 7.0
>>
>> On 2026. július 3., péntek 18:31:12 közép-európai nyári idő Joshi, Mukul
>> wrote:
>>> AMD General
>>>
>>>
>>>> -----Original Message-----
>>>> From: amd-gfx<amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
>>>> Timur Kristóf
>>>> 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 12/14] drm/amdgpu/ih7.0: Use MMIO ACK instead of
>>>> doorbell for retry CAM on IH 7.0
>>>>
>>>>
>>>>
>>>> The doorbell is not working on Navi 48.
>>>> Use the IH_RETRY_CAM_ACK register just like on Navi 3x.
>>>>
>>>>
>>>>
>>>> Signed-off-by: Timur Kristóf<timur.kristof@gmail.com>
>>>> ---
>>>>
>>>>   drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 17 +----------------
>>>>   1 file changed, 1 insertion(+), 16 deletions(-)
>>>>
>>>>
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>>>> b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>>>> index f1de6450a31d..291326d2ee8b 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>>>> @@ -279,19 +279,9 @@ static int ih_v7_0_enable_ring(struct
>>>> amdgpu_device *adev,
>>>>
>>>>        return 0;
>>>>
>>>>   }
>>>>
>>>>
>>>>
>>>> -static uint32_t ih_v7_0_setup_retry_doorbell(u32 doorbell_index) -{
>>>> -     u32 val = 0;
>>>> -
>>>> -     val = REG_SET_FIELD(val, IH_DOORBELL_RPTR, OFFSET,
>>>> doorbell_index);
>>>> -     val = REG_SET_FIELD(val, IH_DOORBELL_RPTR, ENABLE, 1);
>>>> -
>>>> -     return val;
>>>> -}
>>>> -
>>>>
>>>>   static void ih_v7_0_retry_cam_ack(struct amdgpu_device *adev, u32
>>>>
>>>> cam_index)  {
>>>> -     WDOORBELL32(adev->irq.retry_cam_doorbell_index, cam_index);
>>>> +     WREG32_SOC15(OSSSYS, 0, regIH_RETRY_CAM_ACK, cam_index);
>>>>
>>>>   }
>>>>
>>>>
>>>>
>>>>   #define regIH_RING1_CLIENT_CFG_INDEX_V7_1             0x122
>>>>
>>>> @@ -401,11 +391,6 @@ static int ih_v7_0_irq_init(struct
>>>> amdgpu_device
>>>> *adev)
>>>>
>>>>        pci_set_master(adev->pdev);
>>>>
>>>>
>>>>
>>>>        if (amdgpu_ip_version(adev, OSSSYS_HWIP, 0) == IP_VERSION(7,
>>>> 1, 0))
>>>>
>>>> {
>>>
>>> We are re-purposing the IH 7.0 file for IH v7.1 since most of it is same.
>>> The code being removed below is for IH 7.1 and not 7.0.
>>> Using doorbells for acking INT CAM works completely fine for GFX 12.1
>>> and IH 7.1.
>>> I would recommend to drop this patch.
>>>
>> Hello Mukul,
>>
>> Unfortunately I couldn't figure out how to get the doorbell working on Navi 48
>> and in the previous thread Amir said that it also didn't work for him, and that's
>> why I decided to try the MMIO register.
>>
>> If you have an idea how to get the doorbell to work on Navi 48, I'm happy to
>> try your suggestion.
>>
>> Ideally I'd prefer a solution here that works on both Navi 48 and GFX12.1 to
>> keep the code maintainable. If it's not possible then we can also have a slightly
>> different code path for the two different IH versions here.
>>
> Hi Timur,
>
> As I had mentioned on the other patch, we need to enable the NBIO path to route
> the doorbell correctly. That’s the reason wy your doorbells are not working on
> Navi3x and Navi4x.
>
> I am working on the change for Navi4x first and will send it out to you soon one I have verified it on
> my end.
>
> Regards,
> Mukul
>
>
>> Thanks & best regards,
>> Timur
>>
>>>
>>>> -             /* Allocate the doorbell for IH Retry CAM */
>>>> -             adev->irq.retry_cam_doorbell_index = (adev-
>>>>
>>>>> doorbell_index.ih + 2) << 1;
>>>> -             WREG32_SOC15(OSSSYS, 0, regIH_DOORBELL_RETRY_CAM,
>>>> -                             ih_v7_0_setup_retry_doorbell(adev-
>>>>
>>>>> irq.retry_cam_doorbell_index));
>>>> -
>>>>
>>>>                /* Enable IH Retry CAM */
>>>>                tmp = RREG32_SOC15(OSSSYS, 0,
>>>>
>>>> regIH_RETRY_INT_CAM_CNTL);
>>>>
>>>>                tmp = REG_SET_FIELD(tmp, IH_RETRY_INT_CAM_CNTL,
>>>>
>>>> ENABLE, 1);
>>>> --
>>>> 2.54.0
>>>
>>
>>

[-- Attachment #2: Type: text/html, Size: 10948 bytes --]

  reply	other threads:[~2026-07-06 19:04 UTC|newest]

Thread overview: 57+ 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-17 12:06           ` Christian König
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-16  6:43             ` Lazar, Lijo
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
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 [this message]
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=b71aed1c-27c9-436f-be89-05e21c9878f2@amd.com \
    --to=mukul.joshi@amd.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=natalie.vock@gmx.de \
    --cc=timur.kristof@gmail.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