summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTiecheng Zhou <Tiecheng.Zhou@amd.com>2020-04-27 09:44:38 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-04-28 15:28:24 -0400
commit1e4a18cc90044201878f7c869fb4c8fa3b9c6baf (patch)
tree621aaf2825cd7c9aba1c03338b3249c669ff6ebe /drivers
parent87b7ebc2e16c14d32a912f18206a4d6cc9abc3e8 (diff)
Revert "drm/amd/powerplay: avoid using pm_en before it is initialized"
This reverts commit c5207876232649ca5e5ddd6f966d2da75ffded8f. The commit being reverted changed the wrong place, it should have changed in func get_asic_baco_capability. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Tiecheng Zhou <Tiecheng.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/powerplay/amd_powerplay.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 2a12614a12c2..c195575366a3 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1452,8 +1452,7 @@ static int pp_get_asic_baco_state(void *handle, int *state)
if (!hwmgr)
return -EINVAL;
- if (!(hwmgr->not_vf && amdgpu_dpm) ||
- !hwmgr->hwmgr_func->get_asic_baco_state)
+ if (!hwmgr->pm_en || !hwmgr->hwmgr_func->get_asic_baco_state)
return 0;
mutex_lock(&hwmgr->smu_lock);