Skip to content

Commit cc92ade

Browse files
shaoyunlgregkh
authored andcommitted
drm/amdgpu: Add delay after enable RLC ucode
[ Upstream commit ad97d9d ] Driver shouldn't try to access any GFX registers until RLC is idle. During the test, it took 12 seconds for RLC to clear the BUSY bit in RLC_GPM_STAT register which is un-acceptable for driver. As per RLC engineer, it would take RLC Ucode less than 10,000 GFXCLK cycles to finish its critical section. In a lowest 300M enginer clock setting(default from vbios), 50 us delay is enough. This commit fix the hang when RLC introduce the work around for XGMI which requires more cycles to setup more registers than normal Signed-off-by: shaoyunl <[email protected]> Acked-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 8a69edb commit cc92ade

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,12 +1992,13 @@ static void gfx_v9_0_rlc_start(struct amdgpu_device *adev)
19921992
#endif
19931993

19941994
WREG32_FIELD15(GC, 0, RLC_CNTL, RLC_ENABLE_F32, 1);
1995+
udelay(50);
19951996

19961997
/* carrizo do enable cp interrupt after cp inited */
1997-
if (!(adev->flags & AMD_IS_APU))
1998+
if (!(adev->flags & AMD_IS_APU)) {
19981999
gfx_v9_0_enable_gui_idle_interrupt(adev, true);
1999-
2000-
udelay(50);
2000+
udelay(50);
2001+
}
20012002

20022003
#ifdef AMDGPU_RLC_DEBUG_RETRY
20032004
/* RLC_GPM_GENERAL_6 : RLC Ucode version */

0 commit comments

Comments
 (0)