]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/gfx9: use amdgpu_gfx_off_ctrl_immediate() for PG
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 31 Jan 2025 02:25:12 +0000 (21:25 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 13 Feb 2025 02:04:07 +0000 (21:04 -0500)
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.

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Suggested-by: Błażej Szczygieł <mumei6102@gmail.com>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3861
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index 0dce4421418c51fffeb990ed19269ff598a14ec0..ccdfe7c37517961c632aba288ebd5135b06dfa09 100644 (file)
@@ -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;