diff options
author | Huang Rui <ray.huang@amd.com> | 2018-03-02 15:18:54 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-15 13:43:40 -0500 |
commit | 775b0c11e27fce7d204d2911220fd7eebcc074d0 (patch) | |
tree | 3f7955d18801f3de71990dd21087e48b2fa034b6 /drivers/gpu/drm/amd/powerplay | |
parent | 9c82214160ee5e2a1e4137612822a35dc0cc064b (diff) | |
download | linux-775b0c11e27fce7d204d2911220fd7eebcc074d0.tar.bz2 |
drm/amd/powerplay: enable/disable gfxoff through smu
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index bd0d387584ac..6976596449a8 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -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; |