drm/amdgpu: Make gfx_off control by GFX ip
Subsystems (2)
PATCH 2/2 drm/amdgpu: Make gfx_off control by GFX ip
gfx off should be controlled by GFX IP.
Powerplay only export interface to gfx ip.
This logic is same as uvd/vce cg/pg.
Signed-off-by Rex Zhu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4 -0
@@ -3712,6 +3712,10 @@ static int gfx_v9_0_set_powergating_state(void *handle,/* update mgcg state */ gfx_v9_0_update_gfx_mg_power_gating (adev, enable); + +/* update gfx off through smu */ +if (adev->powerplay.pp_funcs->set_powergating_by_smu) +amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_GFX , enable);break ;default :break ;
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c +2 -2
@@ -314,7 +314,7 @@ static int smu10_disable_gfx_off(struct pp_hwmgr *hwmgr)static int smu10_disable_dpm_tasks (struct pp_hwmgr *hwmgr) { -return smu10_disable_gfx_off (hwmgr); +return 0 ; }static int smu10_enable_gfx_off (struct pp_hwmgr *hwmgr)
@@ -329,7 +329,7 @@ static int smu10_enable_gfx_off(struct pp_hwmgr *hwmgr)static int smu10_enable_dpm_tasks (struct pp_hwmgr *hwmgr) { -return smu10_enable_gfx_off (hwmgr); +return 0 ; }static int smu10_gfx_off_control (struct pp_hwmgr *hwmgr,bool enable)
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx