On 2/4/2025 3:13 AM, Alex Deucher wrote: > Use amdgpu_gfx_off_ctrl_immediate() when powergating. > There's no need for the delay in gfx off allow. The > powergating is dynamically disabled/enabled as for > RV/PCO on compute queues and allowing gfx off again as > soon the job is submitted improves power savings. > > Suggested-by: Błażej Szczygieł <mumei6102@xxxxxxxxx> > Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3861 > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Patches 1-4 are Reviewed-by: Lijo Lazar <lijo.lazar@xxxxxxx> with a special note that the CGCG and PG settings may be compared with Windows source later. Skimming over, noticed one change. Thanks, Lijo > --- > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c > index a666832ecefea..dbb9df7913316 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c > @@ -5241,7 +5241,7 @@ static int gfx_v9_0_set_powergating_state(struct amdgpu_ip_block *ip_block, > case IP_VERSION(9, 1, 0): > case IP_VERSION(9, 3, 0): > if (!enable) > - amdgpu_gfx_off_ctrl(adev, false); > + amdgpu_gfx_off_ctrl_immediate(adev, false); > > if (adev->pg_flags & AMD_PG_SUPPORT_RLC_SMU_HS) { > gfx_v9_0_enable_sck_slow_down_on_power_up(adev, true); > @@ -5263,10 +5263,10 @@ static int gfx_v9_0_set_powergating_state(struct amdgpu_ip_block *ip_block, > gfx_v9_0_update_gfx_mg_power_gating(adev, enable); > > if (enable) > - amdgpu_gfx_off_ctrl(adev, true); > + amdgpu_gfx_off_ctrl_immediate(adev, true); > break; > case IP_VERSION(9, 2, 1): > - amdgpu_gfx_off_ctrl(adev, enable); > + amdgpu_gfx_off_ctrl_immediate(adev, enable); > break; > default: > break;