]> git.proxmox.com Git - mirror_ubuntu-kernels.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 19:28:24 +0000 (15:28 -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 2a12614a12c224d9c7f9c3d532d91a20f8024e4e..c195575366a3b2e4ea48c0748cd520dc2d2fbd26 100644 (file)
@@ -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);