Commit eb5f69e7 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/pm: correct the requirement for umc cdr workaround

The workaround can be applied only with UCLK DPM enabled.
And expand the workaround to more Navi10 SKUs and also
Navi14.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bb7257b5
...@@ -2185,19 +2185,18 @@ static int navi10_run_btc(struct smu_context *smu) ...@@ -2185,19 +2185,18 @@ static int navi10_run_btc(struct smu_context *smu)
return ret; return ret;
} }
static inline bool navi10_need_umc_cdr_12gbps_workaround(struct amdgpu_device *adev) static bool navi10_need_umc_cdr_12gbps_workaround(struct smu_context *smu)
{ {
if (adev->asic_type != CHIP_NAVI10) struct amdgpu_device *adev = smu->adev;
if (!smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_UCLK_BIT))
return false; return false;
if (adev->pdev->device == 0x731f && if (adev->asic_type == CHIP_NAVI10 ||
(adev->pdev->revision == 0xc2 || adev->asic_type == CHIP_NAVI14)
adev->pdev->revision == 0xc3 ||
adev->pdev->revision == 0xca ||
adev->pdev->revision == 0xcb))
return true; return true;
else
return false; return false;
} }
static int navi10_umc_hybrid_cdr_workaround(struct smu_context *smu) static int navi10_umc_hybrid_cdr_workaround(struct smu_context *smu)
...@@ -2286,7 +2285,7 @@ static int navi10_disable_umc_cdr_12gbps_workaround(struct smu_context *smu) ...@@ -2286,7 +2285,7 @@ static int navi10_disable_umc_cdr_12gbps_workaround(struct smu_context *smu)
uint32_t param; uint32_t param;
int ret = 0; int ret = 0;
if (!navi10_need_umc_cdr_12gbps_workaround(adev)) if (!navi10_need_umc_cdr_12gbps_workaround(smu))
return 0; return 0;
ret = smu_cmn_get_smc_version(smu, NULL, &pmfw_version); ret = smu_cmn_get_smc_version(smu, NULL, &pmfw_version);
......
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