drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.
Subsystems (2)
PATCH 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +10 -1
@@ -3675,8 +3675,17 @@ 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. +*/ +if (adev->asic_type ==CHIP_RENOIR ) { +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 ); + } } WREG32_SOC15_RLC(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
A coding style issue, "Do not unnecessarily use braces where a single statement will do."
Regards,
Jiansong
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Yifan Zhang
Sent: Wednesday, July 28, 2021 11:40 AM
To: [email protected]
Cc: Zhang, Yifan <[email protected]>
Subject: [PATCH] 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +10 -1
@@ -3675,8 +3675,17 @@ 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. +*/ +if (adev->asic_type ==CHIP_RENOIR ) { +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 ); + } } WREG32_SOC15_RLC(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CJiansong.Chen%40amd.com%7C967ed9eb56a940dbce3208d951795733%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637630403878593524%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hybuiWZ8M%2FGlBT9IHOIVRYvYulI5Ze8Kt51YqHXLihw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx