diff options
author | Tiecheng Zhou <Tiecheng.Zhou@amd.com> | 2020-04-27 04:44:38 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-04-28 18:43:04 +0300 |
commit | a1cd1289a68c4f9fb7551edd06c6a6b4661a4cbb (patch) | |
tree | 4af77fc26bd3e3de795b42fcec1c8990e370506f | |
parent | c6d1ec4134edc1611da39777cdc5dba78c757d35 (diff) | |
download | linux-a1cd1289a68c4f9fb7551edd06c6a6b4661a4cbb.tar.xz |
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.c | 3 |
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); |