drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.
Subsystems (2)
PATCH v3 1/1 drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.
If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +12 -1
@@ -3675,7 +3675,18 @@ static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring)if (ring->use_doorbell) {WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_LOWER, (adev->doorbell_index.kiq *2 ) <<2 ); -WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_UPPER, +/* In renoir, if GC has entered CGPG, ringing doorbell > first page +* doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to +* workaround this issue. And this change has to align with firmware +* update. +*/ +if ((adev->asic_type ==CHIP_RENOIR ) && + (adev->gfx.me_fw_version >=0x000000a5 ) && + (adev->gfx.me_feature_version >=52 )) +WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_UPPER, + (adev->doorbell.size -4 )); +else +WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_UPPER, (adev->doorbell_index.userqueue_end *2 ) <<2 ); }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 17 lines · Yifan Zhang
If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge
CP_MEC_DOORBELL_RANGE_UPPERto workaround this issue.Signed-off-by Yifan Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-1@@ -3675,7 +3675,18 @@ static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring)if (ring->use_doorbell) {WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_LOWER, (adev->doorbell_index.kiq *2 ) <<2 ); - WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring) · line 3687
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +10
-0+/* In renoir, if GC has entered CGPG, ringing doorbell > first page +* doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to +* workaround this issue. And this change has to align with firmware +* update. +*/ +if ((adev->asic_type ==CHIP_RENOIR ) && + (adev->gfx.me_fw_version >=0x000000a5 ) && + (adev->gfx.me_feature_version >=52 )) +WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_UPPER, + (adev->doorbell.size -4 ));
For better readability, perhaps
if (extended_doorbell_range(adev)) ... else ...
and move the ASIC and FW version check inside extended_doorbell_range.
Thanks,
Lijo
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring) · line 3692
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2
-0+else +WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_UPPER, (adev->doorbell_index.userqueue_end *2 ) <<2 ); }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx