Commit e3000669 authored by Jack Xiao's avatar Jack Xiao Committed by Alex Deucher

drm/amd/powerplay: increase waiting time for smu response

We observed some SMU commands take more time for execution,
so increase waiting time for response.
Signed-off-by: default avatarJack Xiao <Jack.Xiao@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 69064bbe
...@@ -67,9 +67,9 @@ static int smu_v11_0_read_arg(struct smu_context *smu, uint32_t *arg) ...@@ -67,9 +67,9 @@ static int smu_v11_0_read_arg(struct smu_context *smu, uint32_t *arg)
static int smu_v11_0_wait_for_response(struct smu_context *smu) static int smu_v11_0_wait_for_response(struct smu_context *smu)
{ {
struct amdgpu_device *adev = smu->adev; struct amdgpu_device *adev = smu->adev;
uint32_t cur_value, i; uint32_t cur_value, i, timeout = adev->usec_timeout * 10;
for (i = 0; i < adev->usec_timeout; i++) { for (i = 0; i < timeout; i++) {
cur_value = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_90); cur_value = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_90);
if ((cur_value & MP1_C2PMSG_90__CONTENT_MASK) != 0) if ((cur_value & MP1_C2PMSG_90__CONTENT_MASK) != 0)
break; break;
...@@ -77,7 +77,7 @@ static int smu_v11_0_wait_for_response(struct smu_context *smu) ...@@ -77,7 +77,7 @@ static int smu_v11_0_wait_for_response(struct smu_context *smu)
} }
/* timeout means wrong logic */ /* timeout means wrong logic */
if (i == adev->usec_timeout) if (i == timeout)
return -ETIME; return -ETIME;
return RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_90) == 0x1 ? 0 : -EIO; return RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_90) == 0x1 ? 0 : -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment