drm/amdgpu: Add delay after enable RLC ucode
Subsystems (2)
PATCH 1/1 drm/amdgpu: Add delay after enable RLC ucode
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.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -0
@@ -2326,6 +2326,7 @@ static void gfx_v9_0_rlc_start(struct amdgpu_device *adev)#endif WREG32_FIELD15 (GC ,0 ,RLC_CNTL ,RLC_ENABLE_F32 ,1 ); +udelay (50 );/* carrizo do enable cp interrupt after cp inited */ if (!(adev->flags &AMD_IS_APU ))
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1542906232-15260-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org
Quoted 18 lines · Shaoyun
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_STATregister 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.Change-Id If074fbeeecad3f63cf5f5ab232472d0fe46082a6Signed-off-by shaoyunl <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_rlc_start(struct amdgpu_device *adev) · line 2332
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -2326,6 +2326,7 @@ static void gfx_v9_0_rlc_start(struct amdgpu_device *adev)#endif WREG32_FIELD15 (GC ,0 ,RLC_CNTL ,RLC_ENABLE_F32 ,1 ); +udelay (50 );/* carrizo do enable cp interrupt after cp inited */ if (!(adev->flags &AMD_IS_APU ))
gfx_v9_0_enable_gui_idle_interrupt(adev, true);
udelay(50);There is already another udelay(50) here. Is that one still needed?
Regards,
Felix
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 5b308d7f-4603-65de-f096-3811cb8377d0-5C7GfCeVMHo@public.gmane.org
The other one i after driver enable the CP interrupt (set register CP_INT_CNTL_RING0) . I think it still needed but maybe can be moved under if statement
Regards
shaoyun.liu
Quoted 30 lines · Felix
Quoted 18 lines · Shaoyun
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_STATregister 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.Change-Id If074fbeeecad3f63cf5f5ab232472d0fe46082a6Signed-off-by shaoyunl <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_rlc_start(struct amdgpu_device *adev) · line 2332
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -2326,6 +2326,7 @@ static void gfx_v9_0_rlc_start(struct amdgpu_device *adev)#endif WREG32_FIELD15 (GC ,0 ,RLC_CNTL ,RLC_ENABLE_F32 ,1 ); +udelay (50 );/* carrizo do enable cp interrupt after cp inited */ if (!(adev->flags &AMD_IS_APU ))gfx_v9_0_enable_gui_idle_interrupt(adev, true); udelay(50);
Quoted 5 lines
There is already another udelay(50) here. Is that one still needed?
Regards,
Felix
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx