Skip to content

Commit c55338d

Browse files
committed
Merge tag 'amd-drm-fixes-5.13-2021-06-16' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-5.13-2021-06-16: amdgpu: - GFX9 and 10 powergating fixes Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 009c9aa + 1c0b0ef commit c55338d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6871,8 +6871,12 @@ static int gfx_v10_0_kiq_init_register(struct amdgpu_ring *ring)
68716871
if (ring->use_doorbell) {
68726872
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_LOWER,
68736873
(adev->doorbell_index.kiq * 2) << 2);
6874+
/* If GC has entered CGPG, ringing doorbell > first page doesn't
6875+
* wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround
6876+
* this issue.
6877+
*/
68746878
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
6875-
(adev->doorbell_index.userqueue_end * 2) << 2);
6879+
(adev->doorbell.size - 4));
68766880
}
68776881

68786882
WREG32_SOC15(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3673,8 +3673,12 @@ static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring)
36733673
if (ring->use_doorbell) {
36743674
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_LOWER,
36753675
(adev->doorbell_index.kiq * 2) << 2);
3676+
/* If GC has entered CGPG, ringing doorbell > first page doesn't
3677+
* wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround
3678+
* this issue.
3679+
*/
36763680
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
3677-
(adev->doorbell_index.userqueue_end * 2) << 2);
3681+
(adev->doorbell.size - 4));
36783682
}
36793683

36803684
WREG32_SOC15_RLC(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,

0 commit comments

Comments
 (0)