diff options
author | Evan Quan <evan.quan@amd.com> | 2020-07-07 11:41:29 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-07-21 15:37:38 -0400 |
commit | af5ba6d21a70e50ae435befcecc733c8ea957972 (patch) | |
tree | 800ae387cc068c507f08740541cdd6c69989d364 /drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | |
parent | 7dbf78051f75f15df7308dde6d55e757b6ec918c (diff) |
drm/amd/powerplay: common API for disabling all features with exception
We are moving to centralize all feature enablement/support checking and
setting APIs in smu_cmn.c.
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/powerplay/amdgpu_smu.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c index 9b7287a9b3ae..f464f9aa30ac 100644 --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c @@ -1108,7 +1108,6 @@ static int smu_hw_init(void *handle) static int smu_disable_dpms(struct smu_context *smu) { struct amdgpu_device *adev = smu->adev; - uint64_t features_to_disable; int ret = 0; bool use_baco = !smu->is_apu && ((adev->in_gpu_reset && @@ -1144,13 +1143,8 @@ static int smu_disable_dpms(struct smu_context *smu) * BACO feature has to be kept enabled. */ if (use_baco && smu_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT)) { - features_to_disable = U64_MAX & - ~(1ULL << smu_cmn_to_asic_specific_index(smu, - CMN2ASIC_MAPPING_FEATURE, - SMU_FEATURE_BACO_BIT)); - ret = smu_feature_update_enable_state(smu, - features_to_disable, - 0); + ret = smu_disable_all_features_with_exception(smu, + SMU_FEATURE_BACO_BIT); if (ret) dev_err(adev->dev, "Failed to disable smu features except BACO.\n"); } else { |