提交 775b0c11 编写于 作者: H Huang Rui 提交者: Alex Deucher

drm/amd/powerplay: enable/disable gfxoff through smu

Signed-off-by: NHuang Rui <ray.huang@amd.com>
Reviewed-by: NHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Acked-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 9c822141
......@@ -222,10 +222,19 @@ static int pp_set_powergating_state(void *handle,
{
struct amdgpu_device *adev = handle;
struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;
int ret;
if (!hwmgr || !hwmgr->pm_en)
return 0;
if (hwmgr->hwmgr_func->gfx_off_control) {
/* Enable/disable GFX off through SMU */
ret = hwmgr->hwmgr_func->gfx_off_control(hwmgr,
state == AMD_PG_STATE_GATE);
if (ret)
pr_err("gfx off control failed!\n");
}
if (hwmgr->hwmgr_func->enable_per_cu_power_gating == NULL) {
pr_info("%s was not implemented.\n", __func__);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册