mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 23:01:04 +07:00
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>
This commit is contained in:
parent
9c82214160
commit
775b0c11e2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user