diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2017-09-05 18:33:58 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-12 20:30:56 +0200 |
commit | 06474d5665729a3275d04212277f17792199b882 (patch) | |
tree | 572c91c00f3e743a4f91cf5a43a01338d6f4eab8 /drivers | |
parent | drm/amd/powerplay: Simplify vega10_patch_voltage_dependency_tables_with_looku... (diff) | |
download | linux-06474d5665729a3275d04212277f17792199b882.tar.xz linux-06474d5665729a3275d04212277f17792199b882.zip |
drm/amd/powerplay: Simplify vega10_acg_disable()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c index 8fb1dccaa4b8..d56e29a0c40b 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c @@ -2313,13 +2313,11 @@ static int vega10_acg_disable(struct pp_hwmgr *hwmgr) struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); - if (data->smu_features[GNLD_ACG].supported) { - if (data->smu_features[GNLD_ACG].enabled) { - if (0 == vega10_enable_smc_features(hwmgr->smumgr, false, - data->smu_features[GNLD_ACG].smu_feature_bitmap)) + if (data->smu_features[GNLD_ACG].supported && + data->smu_features[GNLD_ACG].enabled) + if (!vega10_enable_smc_features(hwmgr->smumgr, false, + data->smu_features[GNLD_ACG].smu_feature_bitmap)) data->smu_features[GNLD_ACG].enabled = false; - } - } return 0; } |