drm/amd/pm: smu_v14_0_0: fix thermal runaway under force_performance_level=high
Subsystems (3)
cover drm/amd/pm: smu_v14_0_0: fix thermal runaway under force_performance_level=high
Hi all,
This patch fixes a thermal runaway / emergency reboot observed on SMU IP 14.0.x APUs when power_dpm_force_performance_level is set to "high" and a sustained heavy compute workload is run.
Background
----------
Setting force_performance_level=high is meant to bias gfxclk towards its maximum while still allowing the firmware's thermal/PPT throttler to clamp the clock when limits are reached. The current driver implements this by sending SetHardMinGfxClk + SetSoftMaxGfxClk in smu_v14_0_0_set_soft_freq_limited_range(), pinning HardMin to peak gfxclk.
In PMFW clock arbitration, however, HardMin has higher priority than SoftMax. Once HardMin is pinned to peak, the throttler's attempts to lower gfxclk through SoftMax are silently overridden. Throttling is effectively disabled for the duration of force_performance_level=high.
Symptom
-------
Under sustained heavy compute load, gfxclk stays at peak with no throttling headroom. GPU temperature climbs rapidly and on platforms with aggressive thermal trip behaviour the system enters an emergency shutdown / reboot before OS-level thermal handlers can react.
Fix
---
Replace SetHardMinGfxClk with SetSoftMinGfxclk in the APU path. The driver still requests peak performance, but the firmware throttler is free to clamp gfxclk via SoftMax when thermal/PPT limits are reached. SoftMax handling is unchanged. No other clock domains are affected.
Validation
----------
Tested on an SMU IP 14.0.x APU at force_performance_level=high with sustained heavy compute. Throttling now engages under load, gfxclk and temperature stay within safe operating limits, and the previously observed thermal runaway / reboot no longer occurs. Light and idle behaviour are unchanged.
Review feedback welcome.
Thanks,
Priya
Priya Hosur (1):
drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in
set_soft_freq_limited_range
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
PATCH 1/1 drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
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.
--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +2 -1
@@ -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 :
Signature · 1 line
2.43.0
A message that is not in the archive (sent off-list or not yet received): DS2PR12MB977328897A55E01978F41CBB8E0B2@DS2PR12MB9773.namprd12.prod.outlook.com
RE: [PATCH 1/1] drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
AMD General
Hi Team
Gentle reminder regarding the review of the patch shared earlier.
Thanks and Regards
Priya Hosur
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Priya Hosur
Sent: Thursday, May 7, 2026 1:32 PM
To: [email protected]; Lazar, Lijo <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Cc: Vishwakarma, Pratik <[email protected]>; Gopalakrishnan, Veerabadhran (Veera) <[email protected]>
Subject: [PATCH 1/1] drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
[Some people who received this message don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
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.
--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +2 -1
@@ -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 :
--
2.43.0
Re: [PATCH 1/1] drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
In reply to Priya HosurQuoted 13 lines · Priya Hosur
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.
Quoted 1 line
Signed-off-by Priya Hosur <[email protected]>
Quoted 21 lines
--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +2
-2@@ -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 : --2.43.0
Hosur, Priya
Acked-by Alex DeucherRE: [PATCH 1/1] drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
AMD General
Hi Srinivasan,
This patch has Alex's Acked-by. Could you please pick this up and apply it.
Thanks and Regards
Priya Hosur
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Tuesday, May 26, 2026 6:52 PM
To: Hosur, Priya <[email protected]>
Cc: [email protected]; Lazar, Lijo <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Vishwakarma, Pratik <[email protected]>; Gopalakrishnan, Veerabadhran (Veera) <[email protected]>
Subject: Re: [PATCH 1/1] drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
Quoted 13 lines · Priya Hosur
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.
Quoted 1 line
Signed-off-by Priya Hosur <[email protected]>
Quoted 22 lines
--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +2
-2@@ -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 : --2.43.0
Re: [PATCH 1/1] drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
In reply to Priya HosurQuoted 4 lines · Priya Hosur
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.
Quoted 8 lines
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.
Though shutdown is controlled with gfx clock adjustment, is it expected to set hardmin for other clock domains for perf levels or should they all set softmin only?
Thanks,
Lijo
Quoted 19 lines
Signed-off-by Priya Hosur <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +2
-1@@ -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 :
RE: [PATCH 1/1] drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
AMD General
Hi Lijo,
Good point. SoftMin variants exist for all domains in the SMU v14 message table (SetSoftMinFclk, SetSoftMinSocclkByFreq, SetSoftMinVcn0). The thermal issue I hit was on gfxclk specifically, but for consistency I'll send a v2 that switches all clock domains to SoftMin so PMFW retains throttling authority across the board. ISP clocks (ispiclk, ispxclk) will stay on HardMin as no SoftMin message variants exist for them.
Thanks and Regards,
Priya Hosur
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Tuesday, June 2, 2026 6:37 PM
To: Hosur, Priya <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Cc: Vishwakarma, Pratik <[email protected]>; Gopalakrishnan, Veerabadhran (Veera) <[email protected]>
Subject: Re: [PATCH 1/1] drm/amd/pm: smu_v14_0_0: use SoftMin for gfxclk in set_soft_freq_limited_range
Quoted 4 lines · Priya Hosur
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.
Quoted 8 lines
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.
Though shutdown is controlled with gfx clock adjustment, is it expected to set hardmin for other clock domains for perf levels or should they all set softmin only?
Thanks,
Lijo
Quoted 20 lines
Signed-off-by Priya Hosur <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +2
-1@@ -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 :