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 <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c 
b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
index 24be9d726428e..4e6d14facf93a 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
@@ -400,12 +390,8 @@ 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)) {
-               /* 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));
-
+       if (amdgpu_ip_version(adev, OSSSYS_HWIP, 0) == IP_VERSION(7, 1, 0) ||
+           !(adev->flags & AMD_IS_APU)) {
                /* 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.53.0

Reply via email to