OSDN Git Service

Revert "drm/amd/powerplay: avoid using pm_en before it is initialized"
authorTiecheng Zhou <Tiecheng.Zhou@amd.com>
Mon, 27 Apr 2020 01:44:38 +0000 (09:44 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Apr 2020 15:43:04 +0000 (11:43 -0400)
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>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c

index fdff3e1..71b843f 100644 (file)
@@ -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);