]> git.baikalelectronics.ru Git - kernel.git/commitdiff
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 8f583d05c13bf8d6f19420dc17d1b0f11108c517.

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 fdff3e1c5e95ff6d67225d2b0f0d4c50f30489dc..71b843f542d8b8f46311cf562bcc4375670826e8 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);