Commit 319dd476 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: avoid repeat AVFS enablement/disablement

No need to enable or disable AVFS if it's already in wanted
state.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 36f5f8a7
...@@ -2364,6 +2364,10 @@ static int vega10_avfs_enable(struct pp_hwmgr *hwmgr, bool enable) ...@@ -2364,6 +2364,10 @@ static int vega10_avfs_enable(struct pp_hwmgr *hwmgr, bool enable)
struct vega10_hwmgr *data = hwmgr->backend; struct vega10_hwmgr *data = hwmgr->backend;
if (data->smu_features[GNLD_AVFS].supported) { if (data->smu_features[GNLD_AVFS].supported) {
/* Already enabled or disabled */
if (!(enable ^ data->smu_features[GNLD_AVFS].enabled))
return 0;
if (enable) { if (enable) {
PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr, PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr,
true, true,
......
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