Patch #1 ~ 4 are Reviewed-by: Hawking Zhang <hawking.zh...@amd.com> Patch #5 The patch will break recent gfxoff fix from Ray where he leveraged pp_set_powergating_state to enable gfxoff. If we didn't control gfxoff in smc power gating function, we have to add a new gfx function which then call into amdgpu_pp interface to do such thing.
Regards, Hawking -----Original Message----- From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> On Behalf Of Rex Zhu Sent: 2018年6月5日 13:22 To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex <rex....@amd.com> Subject: [PATCH 5/5] drm/amd/pp: Remove the gfx pg/off ctrl code out of pp_set_powergating_state This is a ip function for set smu pg state. Although the cg/pg were still not supported on legacy asics, we should not add other ip block's pg code in it. Signed-off-by: Rex Zhu <rex....@amd.com> --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index e519cef..fe3ed8c 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -229,30 +229,7 @@ static int pp_sw_reset(void *handle) static int pp_set_powergating_state(void *handle, enum amd_powergating_state state) { - 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->powergate_gfx == NULL) { - pr_info("%s was not implemented.\n", __func__); - return 0; - } - - /* Enable/disable GFX per cu powergating through SMU */ - return hwmgr->hwmgr_func->powergate_gfx(hwmgr, - state == AMD_PG_STATE_GATE); - + return 0; } static int pp_suspend(void *handle) -- 1.9.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx