summaryrefslogtreecommitdiff
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 11:43:04 -0400
commita1cd1289a68c4f9fb7551edd06c6a6b4661a4cbb (patch)
tree4af77fc26bd3e3de795b42fcec1c8990e370506f
parentc6d1ec4134edc1611da39777cdc5dba78c757d35 (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>
-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 fdff3e1c5e95..71b843f542d8 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1455,8 +1455,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);