From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 927EEC43458 for ; Mon, 6 Jul 2026 19:04:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1860710E1D4; Mon, 6 Jul 2026 19:04:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="IqO50V0b"; dkim-atps=neutral Received: from BL2PR02CU003.outbound.protection.outlook.com (mail-eastusazon11011064.outbound.protection.outlook.com [52.101.52.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2406F10E1D4 for ; Mon, 6 Jul 2026 19:04:25 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pubhfUp1mV9TLb1+3e/Hny8zUqE2WXTCgxAXwfyAApQJwurUatIoCJFGJOWgLNNUvew7pUNxQQe0fZoILTl//tDWpXcWWVmiHTlqmQomUXDVSLpFD3eT/sz4n5GCil+2eGD4XhUSy5GtopGsCxsHpKGh8cUoj3o/s8Zzcy7uyPqWPBQXIiPN35C8jDr0qtU9Pdmw2BoyT0F5Rdznch9WnvwqZmxd31ZWaju/UIeqtgi8c31PIb39wrnp1RmGJut8krc50iIt0WUp5BtwT7FZ6iUjpAELzBiUwfcNhHo6Irwk9WMzH6uK3t5MRHmeVN7cYgXZmlKmxOGsRgXVgFB4Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ke3sl3h72MeS9O52kRAmglwYUtVx/wfCyuohRmWH4dQ=; b=UimsXHZAx00gtYqylbC0mNonONvoNJ0FXBuQZi1Via9Xm9GhoRf5I2w71b9Vq3TDNE90lYsMP8CuDYlOJcDJ2EE66WgDf4I/wGzPmlgiwOKnpRKgBEKgCYJR11dyIWorj3X5uj/ngQQ4e0l0VR8Uw7WgEpLF6v5KQj3RTacuHuPw3kOkFuCocLeWOX8M5Y/M+1VpPQN39RKzSKmPfMrrov/MgsVrjlBOCbJ+Wm65Z0lkZE7kcsQW9YEQQxpZjpffdUijfLiNnt83bKszewm5pIeoHJZmEaP3DWQQtpTIIZkZuIQZq9jEm85yHz+DRsqPUIvTulUiQvVKWfC/7jSwHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ke3sl3h72MeS9O52kRAmglwYUtVx/wfCyuohRmWH4dQ=; b=IqO50V0bxPO1czV+nGbImrJkzi6GE0a3J+C1V7ExJJEzD62uk0C1Oimo/xfR/kQdwThBjO6E+Mxb6vTDIGLR9GuOCcEPcOfXoAzAlP7sOJMt4wztn9FzXlsfOSn77PI2t3Fbdux8IK1vmzw4lIv/paRfvtRkZi0C0+OdFWy1evU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BL3PR12MB6425.namprd12.prod.outlook.com (2603:10b6:208:3b4::7) by LV8PR12MB9405.namprd12.prod.outlook.com (2603:10b6:408:1fa::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.10; Mon, 6 Jul 2026 19:04:10 +0000 Received: from BL3PR12MB6425.namprd12.prod.outlook.com ([fe80::966e:7365:702d:cc74]) by BL3PR12MB6425.namprd12.prod.outlook.com ([fe80::966e:7365:702d:cc74%3]) with mapi id 15.21.0181.009; Mon, 6 Jul 2026 19:04:09 +0000 Content-Type: multipart/alternative; boundary="------------q0cNfPU6F1UOWSoJy5e6bKpH" Message-ID: Date: Mon, 6 Jul 2026 15:03:51 -0400 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 12/14] drm/amdgpu/ih7.0: Use MMIO ACK instead of doorbell for retry CAM on IH 7.0 From: Mukul Joshi To: =?UTF-8?Q?Timur_Krist=C3=B3f?= , "amd-gfx@lists.freedesktop.org" , "Deucher, Alexander" , "Koenig, Christian" , Natalie Vock , "Shetaia, Amir" , =?UTF-8?B?TWFyZWsgT2zFocOhaw==?= , "Limonciello, Mario" , Tvrtko Ursulin , "Kuehling, Felix" , "Lazar, Lijo" , "He, Siwei" , "Yang, Philip" References: <20260701161721.85681-1-timur.kristof@gmail.com> <20260701161721.85681-13-timur.kristof@gmail.com> <5742390.E0xQCEvomI@timur-max> Content-Language: en-CA In-Reply-To: X-ClientProxiedBy: YT4PR01CA0048.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:fe::9) To BL3PR12MB6425.namprd12.prod.outlook.com (2603:10b6:208:3b4::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL3PR12MB6425:EE_|LV8PR12MB9405:EE_ X-MS-Office365-Filtering-Correlation-Id: 1bdbe0df-99db-4569-10f5-08dedb915bec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|23010399003|1800799024|376014|366016|18002099003|22082099003|11063799006|4143699003|56012099006|8096899003|921020; X-Microsoft-Antispam-Message-Info: 0eCfg45FvXEsjtnUIZ1tDyZbNHDs8aoHG6RsG7jmdL5w6RGNi+zamLFSlrOfDhRoxqv2n5hz1LS5/NCfN0KxhtvDUkoqS4Shkk/1MLV4IWuloqEWyMGE38V+IcDSJCBsVbT9YZSPAuvhEeiYOKGbQsxGv7l83xwWtlgDUJgZFiMbhaBNtUBTtiUIgA74eiURJXakaUbQfcISw68fzAXHK6CO5YaqS7GsHJuuIEJWYiBktGscnNYkLcF3PN48T2I8LQXaKX3DCXz76a4zycQBL+qCEJ4szE3MBqGpB1A7G1zR9IPxzz5d0wCuxA98wu7HqbNht8Dt7mWWTkVyazeyr0QqiOfDxknxU+2t+SasWPZUHbw2CSv5j6H8W2IXfaDsm8H7hlVox+BfX0GdbR+ZfNhdz8G8Pa5lDq3N/xqelWTMI7DIeLqbv+J+/kSQDguu7EYZTfJGfkPmm0frUDK3sTF/aIYfLWtF/+Fdp8ReqiT0ZOahkkhZ30CgZNBAwGROO4zp0GuMZi7sk0Z2GmXIw/t+EX++ZHLSEFDLPxhK6FaJpsQoEOpzrsJ0oH0i0eo8n3pG4tBc/iX5bn/swY7z60lADLgT+77oWazFfnuq5WON+qazWK1xk0u8qUAOJDRHszzvzTsjFPvary8Ftspk10k0c4xkCd3DA0Sv/unlQka+YfHiAz4YAqqStK/hdfb3Da+jiBMsBnJA8wzNdeDddg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL3PR12MB6425.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(23010399003)(1800799024)(376014)(366016)(18002099003)(22082099003)(11063799006)(4143699003)(56012099006)(8096899003)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TUZOenFEMVJuS1g1elcrUEI1Y2ZGS1ZnUDF5c0RpNlhKWkZqT295emNRYUo1?= =?utf-8?B?ekRCbUluaVpDSGVrdnBlaEg5TnpOTlltTWJMK21BZU0yd1hhc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EV0VDbis1Vms4cVZrRDNxRmoyTkw3ZUE2Sjd3YXI1WFJlV0hWQVdl?= =?utf-8?B?YnN1M3luQm45eXc0c0xnYUxDSU9OZnltMm9zY1loek5JckpaeWROWVVjY1pt?= =?utf-8?B?TC9uU3hJMnZ0cjFTNVB6czNUb3k2N1ZuSnRTZU9kaHowbVZDZHZOd2VUbFdy?= =?utf-8?B?SnNhZkZoejByaUwvd1hnZXMvQXIxcURneWQ4b3BaczQycnp2d05ubjVidnlj?= =?utf-8?B?TFRvUW8zWDRUZ3NYc3NXTTVJamFoRHg2dysxK0hkSGhMOVF4MGlITmZ6cndX?= =?utf-8?B?aC8yQWR1WGdCVGVyRU9uZStURjUwakZsSjdVN0Urc0RkRnZlZkFzbWlBV1pn?= =?utf-8?B?QVFjdnkwU0Uwd0NFQVZObjBBS3pzTGdSUHlTZ3V2RHNVcXFLVHVGYVFDdmRr?= =?utf-8?Q?+fz+uD1H6ObosrY92V?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bdbe0df-99db-4569-10f5-08dedb915bec X-MS-Exchange-CrossTenant-AuthSource: BL3PR12MB6425.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2026 19:04:09.8239 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FUhbWqeBWOcsP0CXtuaXMI8Pq16Fb0zvpZRF2wpH1hv2rEUQFm51Xed4WnDL3XSym5wCz1huVXSO3PfokEVR8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9405 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" --------------q0cNfPU6F1UOWSoJy5e6bKpH Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 >> Sent: Friday, July 3, 2026 2:41 PM >> To:amd-gfx@lists.freedesktop.org; Deucher, Alexander >> ; Koenig, Christian >> ; Natalie Vock; Shetaia, >> Amir; Marek Olšák; >> Limonciello, Mario; Tvrtko Ursulin >> ; Kuehling, Felix; Lazar, Lijo >> ; He, Siwei; Yang, Philip >> ; Joshi, Mukul >> 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 On Behalf Of >>>> Timur Kristóf >>>> Sent: Wednesday, July 1, 2026 12:17 PM >>>> To:amd-gfx@lists.freedesktop.org; Deucher, Alexander >>>> ; Koenig, Christian >>>> ; Natalie Vock; >>>> Shetaia, Amir; Marek Olšák >>>> ; Limonciello, Mario; >>>> Tvrtko Ursulin; Kuehling, Felix >>>> ; Lazar, Lijo >> ; He, Siwei; Yang, Philip >>>> ; Joshi, Mukul >>>> Cc: Timur Kristóf >>>> 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 >>>> --- >>>> >>>> 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 >>> >> >> --------------q0cNfPU6F1UOWSoJy5e6bKpH Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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




    
--------------q0cNfPU6F1UOWSoJy5e6bKpH--