diff options
author | Evan Quan <evan.quan@amd.com> | 2020-12-07 15:50:08 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-06-11 16:02:30 -0400 |
commit | 1e75be2b674932b53ed1bdd7df35f89e47585388 (patch) | |
tree | ebe66004b871fc1f1eba286b5dfcbe413d170652 /drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | |
parent | 415e51bdcfa0e724172f66ce12d8ef7819fdd1c7 (diff) | |
download | linux-1e75be2b674932b53ed1bdd7df35f89e47585388.tar.gz linux-1e75be2b674932b53ed1bdd7df35f89e47585388.tar.bz2 linux-1e75be2b674932b53ed1bdd7df35f89e47585388.zip |
drm/amd/pm: update the cached dpm feature status
For some ASICs, the real dpm feature disablement job is handled by
PMFW during baco reset and custom pptable loading. Cached dpm feature
status need to be updated to pair that.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c')
-rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index b4ea8b233240..e6673753595c 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -1379,7 +1379,9 @@ static int smu_disable_dpms(struct smu_context *smu) if (smu->uploading_custom_pp_table && (adev->asic_type >= CHIP_NAVI10) && (adev->asic_type <= CHIP_DIMGREY_CAVEFISH)) - return 0; + return smu_disable_all_features_with_exception(smu, + true, + SMU_FEATURE_COUNT); /* * For Sienna_Cichlid, PMFW will handle the features disablement properly @@ -1387,7 +1389,9 @@ static int smu_disable_dpms(struct smu_context *smu) */ if ((adev->asic_type == CHIP_SIENNA_CICHLID) && use_baco) - return 0; + return smu_disable_all_features_with_exception(smu, + true, + SMU_FEATURE_BACO_BIT); /* * For gpu reset, runpm and hibernation through BACO, @@ -1395,6 +1399,7 @@ static int smu_disable_dpms(struct smu_context *smu) */ if (use_baco && smu_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT)) { ret = smu_disable_all_features_with_exception(smu, + false, SMU_FEATURE_BACO_BIT); if (ret) dev_err(adev->dev, "Failed to disable smu features except BACO.\n"); |