diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-03-26 11:18:34 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-04-11 21:07:49 +0300 |
commit | b13aa1091fb2002a6854e0401df5fc6231fbca58 (patch) | |
tree | f9ef27d92698d885b4699cb8c580d47e393fc7f7 /drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | |
parent | 64f6db77fcb81493988061587fa478e6612dc45b (diff) | |
download | linux-b13aa1091fb2002a6854e0401df5fc6231fbca58.tar.xz |
drm/amdgpu: Use dpm_enabled as dpm state flag
driver will set dpm_enabled to true only when
module parameter amdgpu_dpm not equal to 0 and
smu hw initialize successfully.
Reviewed-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index 30ff8a9c301b..bca67df29c8c 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c @@ -211,7 +211,6 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr) !hwmgr->pptable_func->pptable_init || !hwmgr->hwmgr_func->backend_init) { hwmgr->pm_en = false; - ((struct amdgpu_device *)hwmgr->adev)->pm.dpm_enabled = false; pr_info("dpm not supported \n"); return 0; } @@ -240,6 +239,8 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr) if (ret) goto err2; + ((struct amdgpu_device *)hwmgr->adev)->pm.dpm_enabled = true; + return 0; err2: if (hwmgr->hwmgr_func->backend_fini) |