]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
authorPriya Hosur <Priya.Hosur@amd.com>
Thu, 7 May 2026 08:01:37 +0000 (13:31 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jun 2026 18:57:46 +0000 (14:57 -0400)
In smu_v14_0_0_set_soft_freq_limited_range(), the gfxclk floor is
programmed via SetHardMinGfxClk together with SetSoftMaxGfxClk. Under
power_dpm_force_performance_level=high this pins HardMin to peak gfxclk.

In PMFW arbitration HardMin has higher priority than SoftMax, so the
firmware thermal/PPT throttler cannot clamp gfxclk via SoftMax once
HardMin is set to peak. Replace SetHardMinGfxClk with SetSoftMinGfxclk
so the driver still requests peak performance but the firmware
throttler retains the ability to clamp gfxclk under thermal/PPT
pressure. SoftMax handling is unchanged and no other clock domains
are affected.

Signed-off-by: Priya Hosur <Priya.Hosur@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 3ea273267fd29cbf6d83ee72329f59eb5042605b)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c

index a28624d4847af54f8c625a38be88353cabcd5590..75719c47a41e2096b0d3271ec4e1fd86583a6d2e 100644 (file)
@@ -1231,7 +1231,8 @@ static int smu_v14_0_0_set_soft_freq_limited_range(struct smu_context *smu,
        switch (clk_type) {
        case SMU_GFXCLK:
        case SMU_SCLK:
-               msg_set_min = SMU_MSG_SetHardMinGfxClk;
+               /* SoftMin lets PMFW throttle gfxclk; HardMin would override SoftMax. */
+               msg_set_min = SMU_MSG_SetSoftMinGfxclk;
                msg_set_max = SMU_MSG_SetSoftMaxGfxClk;
                break;
        case SMU_FCLK: