FAILED: patch "[PATCH] drm/amd/pm: add zero fan stop temperature support on smu 14.0.2" failed to apply to 5.15-stable tree
Sasha Levin
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x af52c8fd45fbd5e3b7a329858733ac674abe539c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From af52c8fd45fbd5e3b7a329858733ac674abe539c Mon Sep 17 00:00:00 2001
From: Kenneth Feng <[email protected]>
Date: Thu, 8 Oct 2026 20:28:09 +0800
Subject: [PATCH] drm/amd/pm: add zero fan stop temperature support on smu
14.0.2
add zero fan stop temperature support on smu 14.0.2
--- .../drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +54 -1
@@ -89,6 +89,7 @@ static const struct smu_feature_bits smu_v14_0_2_dpm_features = {#define PP_OD_FEATURE_FAN_TARGET_TEMPERATURE 9#define PP_OD_FEATURE_FAN_MINIMUM_PWM 10#define PP_OD_FEATURE_FAN_ZERO_RPM_ENABLE 11 +#define PP_OD_FEATURE_FAN_ZERO_RPM_STOP_TEMP 12static struct cmn2asic_msg_mapping smu_v14_0_2_message_map[SMU_MSG_MAX_COUNT ] = {MSG_MAP (TestMessage, PPSMC_MSG_TestMessage,1 ),
@@ -1020,6 +1021,10 @@ static void smu_v14_0_2_get_od_setting_limits(struct smu_context *smu, od_min_setting = overdrive_lowerlimits->FanZeroRpmEnable; od_max_setting = overdrive_upperlimits->FanZeroRpmEnable;break ; +case PP_OD_FEATURE_FAN_ZERO_RPM_STOP_TEMP : + od_min_setting = pptable->SkuTable.MsgLimits.FanStopTempMin; + od_max_setting = pptable->SkuTable.MsgLimits.FanStopTempMax; +break ;default : od_min_setting = od_max_setting =INT_MAX ;break ;
@@ -1244,6 +1249,24 @@ static int smu_v14_0_2_emit_clk_levels(struct smu_context *smu, min_value, max_value);break ; +case SMU_OD_FAN_ZERO_RPM_STOP_TEMP : +if (!smu_v14_0_2_is_od_feature_supported (smu, +PP_OD_FEATURE_ZERO_FAN_BIT )) +break ; + + size +=sysfs_emit_at (buf, size,"FAN_ZERO_RPM_STOP_TEMPERATURE:\n" ); + size +=sysfs_emit_at (buf, size,"%d\n" , + (int )od_table->OverDriveTable.FanZeroRpmStopTemp); + + size +=sysfs_emit_at (buf, size,"%s:\n" ,"OD_RANGE" ); +smu_v14_0_2_get_od_setting_limits (smu, +PP_OD_FEATURE_FAN_ZERO_RPM_STOP_TEMP , + &min_value, + &max_value); + size +=sysfs_emit_at (buf, size,"ZERO_RPM_STOP_TEMPERATURE: %u %u\n" , + min_value, max_value); +break ; +case SMU_OD_RANGE : if (!smu_v14_0_2_is_od_feature_supported(smu, PP_OD_FEATURE_GFXCLK_BIT) && !smu_v14_0_2_is_od_feature_supported(smu, PP_OD_FEATURE_UCLK_BIT) &&
@@ -2311,7 +2334,9 @@ static void smu_v14_0_2_set_supported_od_feature_mask(struct smu_context *smu)OD_OPS_SUPPORT_FAN_MINIMUM_PWM_RETRIEVE |OD_OPS_SUPPORT_FAN_MINIMUM_PWM_SET |OD_OPS_SUPPORT_FAN_ZERO_RPM_ENABLE_RETRIEVE | -OD_OPS_SUPPORT_FAN_ZERO_RPM_ENABLE_SET ; +OD_OPS_SUPPORT_FAN_ZERO_RPM_ENABLE_SET | +OD_OPS_SUPPORT_FAN_ZERO_RPM_STOP_TEMP_RETRIEVE | +OD_OPS_SUPPORT_FAN_ZERO_RPM_STOP_TEMP_SET ; } static int smu_v14_0_2_get_overdrive_table(struct smu_context *smu,
@@ -2393,6 +2418,8 @@ static int smu_v14_0_2_set_default_od_settings(struct smu_context *smu) user_od_table_bak.OverDriveTable.FanMinimumPwm; user_od_table->OverDriveTable.FanZeroRpmEnable = user_od_table_bak.OverDriveTable.FanZeroRpmEnable; + user_od_table->OverDriveTable.FanZeroRpmStopTemp = + user_od_table_bak.OverDriveTable.FanZeroRpmStopTemp; }smu_v14_0_2_set_supported_od_feature_mask (smu);
@@ -2444,6 +2471,11 @@ static int smu_v14_0_2_od_restore_table_single(struct smu_context *smu, long inp boot_overdrive_table->OverDriveTable.FanZeroRpmEnable; od_table->OverDriveTable.FeatureCtrlMask |=BIT (PP_OD_FEATURE_ZERO_FAN_BIT );break ; +case PP_OD_EDIT_FAN_ZERO_RPM_STOP_TEMP : + od_table->OverDriveTable.FanZeroRpmStopTemp = + boot_overdrive_table->OverDriveTable.FanZeroRpmStopTemp; + od_table->OverDriveTable.FeatureCtrlMask |=BIT (PP_OD_FEATURE_ZERO_FAN_BIT ); +break ;case PP_OD_EDIT_ACOUSTIC_LIMIT : od_table->OverDriveTable.AcousticLimitRpmThreshold = boot_overdrive_table->OverDriveTable.AcousticLimitRpmThreshold;
@@ -2749,6 +2781,27 @@ static int smu_v14_0_2_od_edit_dpm_table(struct smu_context *smu, od_table->OverDriveTable.FeatureCtrlMask |=BIT (PP_OD_FEATURE_ZERO_FAN_BIT );break ; +case PP_OD_EDIT_FAN_ZERO_RPM_STOP_TEMP : +if (!smu_v14_0_2_is_od_feature_supported (smu,PP_OD_FEATURE_ZERO_FAN_BIT )) { +dev_warn (adev->dev,"Zero RPM setting not supported!\n" ); +return -ENOTSUPP ; + } + +smu_v14_0_2_get_od_setting_limits (smu, +PP_OD_FEATURE_FAN_ZERO_RPM_STOP_TEMP , + &minimum, + &maximum); +if (input[0 ] < minimum || + input[0 ] > maximum) { +dev_info (adev->dev,"zero RPM stop temperature setting(%ld) must be within [%d, %d]!\n" , + input[0 ], minimum, maximum); +return -EINVAL ; + } + + od_table->OverDriveTable.FanZeroRpmStopTemp = input[0 ]; + od_table->OverDriveTable.FeatureCtrlMask |=BIT (PP_OD_FEATURE_ZERO_FAN_BIT ); +break ; +case PP_OD_RESTORE_DEFAULT_TABLE :if (size ==1 ) { ret =smu_v14_0_2_od_restore_table_single (smu, input[0 ]);
Signature · 1 line
2.53.0