drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt
Subsystems (2)
PATCH 1/1 drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt
50us is not enough to wait for cp ready after gpu reset on some navi asics.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +11 -1
@@ -2371,7 +2371,17 @@ static void gfx_v10_0_cp_gfx_enable(struct amdgpu_device *adev, bool enable) adev->gfx.gfx_ring[i].sched.ready = false; }WREG32_SOC15 (GC ,0 , mmCP_ME_CNTL, tmp); -udelay (50 ); + +for (i =0 ; i < adev->usec_timeout; i++) { +if (RREG32_SOC15 (GC ,0 , mmCP_STAT) ==0 ) +break ; +udelay (1 ); + } + +if (i >= adev->usec_timeout) +DRM_ERROR ("failed to %s cp gfx\n" , enable ?"unhalt" :"halt" ); + +return 0 ; }static int gfx_v10_0_cp_gfx_load_pfp_microcode (struct amdgpu_device *adev)
Signature · 6 lines
2.20.1 _______________________________________________ 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): [email protected]
Deucher, Alexander
Acked-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Xiaojie Yuan <[email protected]>
Sent: Thursday, November 14, 2019 4:13 AM
To: [email protected] <[email protected]>
Cc: Long, Gang <[email protected]>; Xiao, Jack <[email protected]>; Yuan, Xiaojie <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt
50us is not enough to wait for cp ready after gpu reset on some navi asics.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +11 -1
@@ -2371,7 +2371,17 @@ static void gfx_v10_0_cp_gfx_enable(struct amdgpu_device *adev, bool enable) adev->gfx.gfx_ring[i].sched.ready = false; }WREG32_SOC15 (GC ,0 , mmCP_ME_CNTL, tmp); -udelay (50 ); + +for (i =0 ; i < adev->usec_timeout; i++) { +if (RREG32_SOC15 (GC ,0 , mmCP_STAT) ==0 ) +break ; +udelay (1 ); + } + +if (i >= adev->usec_timeout) +DRM_ERROR ("failed to %s cp gfx\n" , enable ?"unhalt" :"halt" ); + +return 0 ; }static int gfx_v10_0_cp_gfx_load_pfp_microcode (struct amdgpu_device *adev)
--
2.20.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx