Commit 9667849b authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

drm/amd/powerplay: add control gfxoff enabling in late init

Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1dedc623
...@@ -180,6 +180,7 @@ static int pp_late_init(void *handle) ...@@ -180,6 +180,7 @@ static int pp_late_init(void *handle)
{ {
struct amdgpu_device *adev = handle; struct amdgpu_device *adev = handle;
struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle; struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;
int ret;
if (hwmgr && hwmgr->pm_en) { if (hwmgr && hwmgr->pm_en) {
mutex_lock(&hwmgr->smu_lock); mutex_lock(&hwmgr->smu_lock);
...@@ -189,6 +190,14 @@ static int pp_late_init(void *handle) ...@@ -189,6 +190,14 @@ static int pp_late_init(void *handle)
} }
if (adev->pm.smu_prv_buffer_size != 0) if (adev->pm.smu_prv_buffer_size != 0)
pp_reserve_vram_for_smu(adev); pp_reserve_vram_for_smu(adev);
if (hwmgr->hwmgr_func->gfx_off_control &&
(hwmgr->feature_mask & PP_GFXOFF_MASK)) {
ret = hwmgr->hwmgr_func->gfx_off_control(hwmgr, true);
if (ret)
pr_err("gfx off enabling failed!\n");
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment