diff options
author | Evan Quan <evan.quan@amd.com> | 2020-08-26 18:27:09 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-09-17 17:46:56 -0400 |
commit | eb5f69e7660f2b2ff23a362f1b33a74e078e1508 (patch) | |
tree | dc85ca7d36ed1b347c4def60b2a1f9096ac66162 /drivers/gpu/drm/amd/pm | |
parent | bb7257b5a8b0182019df3b9819417301978d7538 (diff) | |
download | linux-eb5f69e7660f2b2ff23a362f1b33a74e078e1508.tar.bz2 |
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: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm')
-rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index 5c6243dd7dd4..64166b25bd13 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c @@ -2185,19 +2185,18 @@ static int navi10_run_btc(struct smu_context *smu) 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; - if (adev->pdev->device == 0x731f && - (adev->pdev->revision == 0xc2 || - adev->pdev->revision == 0xc3 || - adev->pdev->revision == 0xca || - adev->pdev->revision == 0xcb)) + if (adev->asic_type == CHIP_NAVI10 || + adev->asic_type == CHIP_NAVI14) return true; - else - return false; + + return false; } 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) uint32_t param; int ret = 0; - if (!navi10_need_umc_cdr_12gbps_workaround(adev)) + if (!navi10_need_umc_cdr_12gbps_workaround(smu)) return 0; ret = smu_cmn_get_smc_version(smu, NULL, &pmfw_version); |