mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Kenneth Feng <kenneth.feng@amd.com>,
	Kevin Wang <kevin.wang@amd.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the amdgpu tree with the origin tree
Date: Wed, 28 Oct 2026 13:28:38 +0000	[thread overview]
Message-ID: <auH4hkxipwOwNz44@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 18361 bytes --]

Hi all,

Today's linux-next merge of the amdgpu tree got a conflict in:

  drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c

between commit:

  a2eae9f4fa1b0 ("drm/amd/pm: add zero fan stop temperature support on smu 14.0.2")

from the origin tree and commits:

  f990c94a2633d ("drm/amd/pm: add zero fan stop temperature support on smu 14.0.2")
  1b63bb397db20 ("drm/amd/pm:restate all customized OD features on every table upload for smu 13.0.0/smu 14.0.2")
  d2c1e98658b6c ("drm/amd/pm: report smu energy accumulator updates")
  8d4ce79aff1cd ("drm/amd/pm: preserve committed OD features for SMU 14.0.2")

from the amdgpu tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
index 6621e50de9651,62f16d17e22bc..0000000000000
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
@@@ -91,6 -91,10 +91,10 @@@ static const struct smu_feature_bits sm
  #define PP_OD_FEATURE_FAN_ZERO_RPM_ENABLE		11
  #define PP_OD_FEATURE_FAN_ZERO_RPM_STOP_TEMP		12
  
+ #define SMU_14_0_2_OD_FAN_FEATURE_MASK \
+ 	(BIT(PP_OD_FEATURE_FAN_CURVE_BIT) | \
+ 	 BIT(PP_OD_FEATURE_FAN_LEGACY_BIT))
+ 
  static struct cmn2asic_msg_mapping smu_v14_0_2_message_map[SMU_MSG_MAX_COUNT] = {
  	MSG_MAP(TestMessage,			PPSMC_MSG_TestMessage,                 1),
  	MSG_MAP(GetSmuVersion,			PPSMC_MSG_GetSmuVersion,               1),
@@@ -963,6 -967,84 +967,84 @@@ out
  	return feature_enabled;
  }
  
+ static u32
+ smu_v14_0_2_filter_od_feature_mask(struct smu_context *smu, u32 feature_mask)
+ {
+ 	PPTable_t *pptable = smu->smu_table.driver_pptable;
+ 	u32 supported_mask =
+ 		pptable->SkuTable.OverDriveLimitsBasicMax.FeatureCtrlMask;
+ 
+ 	return feature_mask & supported_mask;
+ }
+ 
+ static u32
+ smu_v14_0_2_get_od_feature_mask(struct smu_context *smu, u32 pending_mask)
+ {
+ 	u32 supported_mask = smu_v14_0_2_filter_od_feature_mask(smu, ~0U);
+ 	u32 fan_mask = supported_mask & SMU_14_0_2_OD_FAN_FEATURE_MASK;
+ 	u32 mask = smu->smu_table.user_od_feature_mask;
+ 
+ 	if (pending_mask & fan_mask)
+ 		mask &= ~fan_mask;
+ 	mask |= pending_mask;
+ 
+ 	return smu_v14_0_2_filter_od_feature_mask(smu, mask);
+ }
+ 
+ static bool smu_v14_0_2_fan_is_default(const OverDriveTable_t *od,
+ 				       const OverDriveTable_t *boot)
+ {
+ 	return !memcmp(od->FanLinearPwmPoints, boot->FanLinearPwmPoints,
+ 			sizeof(od->FanLinearPwmPoints)) &&
+ 		!memcmp(od->FanLinearTempPoints, boot->FanLinearTempPoints,
+ 			sizeof(od->FanLinearTempPoints)) &&
+ 		od->AcousticTargetRpmThreshold == boot->AcousticTargetRpmThreshold &&
+ 		od->AcousticLimitRpmThreshold == boot->AcousticLimitRpmThreshold &&
+ 		od->FanTargetTemperature == boot->FanTargetTemperature &&
+ 		od->FanMode == boot->FanMode;
+ }
+ 
+ static bool smu_v14_0_2_legacy_fan_is_default(const OverDriveTable_t *od,
+ 					      const OverDriveTable_t *boot)
+ {
+ 	return od->FanMinimumPwm == boot->FanMinimumPwm &&
+ 		od->FanMode == boot->FanMode;
+ }
+ 
+ static bool smu_v14_0_2_zero_fan_is_default(const OverDriveTable_t *od,
+ 					    const OverDriveTable_t *boot)
+ {
+ 	return od->FanZeroRpmEnable == boot->FanZeroRpmEnable &&
+ 		od->FanZeroRpmStopTemp == boot->FanZeroRpmStopTemp;
+ }
+ 
+ static u32 smu_v14_0_2_normalize_feature_mask(const OverDriveTable_t *od,
+ 					      const OverDriveTable_t *boot,
+ 					      u32 feature_mask)
+ {
+ 	if (od->GfxclkFoffset == boot->GfxclkFoffset)
+ 		feature_mask &= ~BIT(PP_OD_FEATURE_GFXCLK_BIT);
+ 	if (od->UclkFmin == boot->UclkFmin &&
+ 	    od->UclkFmax == boot->UclkFmax)
+ 		feature_mask &= ~BIT(PP_OD_FEATURE_UCLK_BIT);
+ 	if (!memcmp(od->VoltageOffsetPerZoneBoundary,
+ 		    boot->VoltageOffsetPerZoneBoundary,
+ 		    sizeof(od->VoltageOffsetPerZoneBoundary)))
+ 		feature_mask &= ~BIT(PP_OD_FEATURE_GFX_VF_CURVE_BIT);
+ 	if ((feature_mask & BIT(PP_OD_FEATURE_FAN_CURVE_BIT)) &&
+ 	    smu_v14_0_2_fan_is_default(od, boot))
+ 		feature_mask &= ~BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
+ 	if ((feature_mask & BIT(PP_OD_FEATURE_FAN_LEGACY_BIT)) &&
+ 	    smu_v14_0_2_legacy_fan_is_default(od, boot))
+ 		feature_mask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
+ 	if (smu_v14_0_2_zero_fan_is_default(od, boot))
+ 		feature_mask &= ~BIT(PP_OD_FEATURE_ZERO_FAN_BIT);
+ 	if (!od->Ppt)
+ 		feature_mask &= ~BIT(PP_OD_FEATURE_PPT_BIT);
+ 
+ 	return feature_mask;
+ }
+ 
  static void smu_v14_0_2_get_od_setting_limits(struct smu_context *smu,
  					      int od_feature_bit,
  					      int32_t *min,
@@@ -2195,8 -2277,11 +2277,11 @@@ static ssize_t smu_v14_0_2_get_gpu_metr
  					       metrics->Vcn1ActivityPercentage);
  
  	gpu_metrics->average_socket_power = metrics->AverageSocketPower;
- 	if (mp1_ver == IP_VERSION(14, 0, 3) && smu->smc_fw_version >= 0x00685000)
- 	    gpu_metrics->energy_accumulator = metrics->EnergyAccumulator;
+ 	if ((mp1_ver == IP_VERSION(14, 0, 2) &&
+ 	     smu->smc_fw_version >= 0x00664800) ||
+ 	    (mp1_ver == IP_VERSION(14, 0, 3) &&
+ 	     smu->smc_fw_version >= 0x00685000))
+ 		gpu_metrics->energy_accumulator = metrics->EnergyAccumulator;
  
  	if (metrics->AverageGfxActivity <= SMU_14_0_2_BUSY_THRESHOLD)
  		gpu_metrics->average_gfxclk_frequency = metrics->AverageGfxclkFrequencyPostDs;
@@@ -2317,6 -2402,38 +2402,38 @@@ static int smu_v14_0_2_upload_overdrive
  	return ret;
  }
  
+ static int
+ smu_v14_0_2_upload_ppt_overdrive_table(struct smu_context *smu, s16 ppt)
+ {
+ 	struct smu_table_context *table_context = &smu->smu_table;
+ 	OverDriveTableExternal_t *od_table = table_context->overdrive_table;
+ 	OverDriveTableExternal_t *user_od_table = table_context->user_overdrive_table;
+ 	OverDriveTableExternal_t upload_table;
+ 	u32 next_mask = table_context->user_od_feature_mask;
+ 	int ret;
+ 
+ 	/* Do not commit OD settings staged after the last c operation. */
+ 	memcpy(&upload_table, user_od_table, sizeof(upload_table));
+ 	upload_table.OverDriveTable.Ppt = ppt;
+ 	if (ppt)
+ 		next_mask |= BIT(PP_OD_FEATURE_PPT_BIT);
+ 	else
+ 		next_mask &= ~BIT(PP_OD_FEATURE_PPT_BIT);
+ 	upload_table.OverDriveTable.FeatureCtrlMask =
+ 		smu_v14_0_2_filter_od_feature_mask(smu, next_mask);
+ 
+ 	ret = smu_v14_0_2_upload_overdrive_table(smu, &upload_table);
+ 	if (ret)
+ 		return ret;
+ 
+ 	table_context->user_od_feature_mask =
+ 		upload_table.OverDriveTable.FeatureCtrlMask;
+ 	od_table->OverDriveTable.Ppt = ppt;
+ 	user_od_table->OverDriveTable.Ppt = ppt;
+ 
+ 	return 0;
+ }
+ 
  static void smu_v14_0_2_set_supported_od_feature_mask(struct smu_context *smu)
  {
  	struct amdgpu_device *adev = smu->adev;
@@@ -2375,6 -2492,7 +2492,7 @@@ static int smu_v14_0_2_set_default_od_s
  	memcpy(od_table,
  	       boot_od_table,
  	       sizeof(OverDriveTableExternal_t));
+ 	od_table->OverDriveTable.FeatureCtrlMask = 0;
  
  	/*
  	 * For S3/S4/Runpm resume, we need to setup those overdrive tables again,
@@@ -2384,7 -2502,9 +2502,9 @@@
  		memcpy(user_od_table,
  		       boot_od_table,
  		       sizeof(OverDriveTableExternal_t));
+ 		user_od_table->OverDriveTable.FeatureCtrlMask = 0;
  		smu->user_dpm_profile.user_od = false;
+ 		smu->smu_table.user_od_feature_mask = 0;
  	} else if (smu->user_dpm_profile.user_od) {
  		memcpy(&user_od_table_bak,
  		       user_od_table,
@@@ -2419,6 -2539,14 +2539,14 @@@
  			user_od_table_bak.OverDriveTable.FanZeroRpmEnable;
  		user_od_table->OverDriveTable.FanZeroRpmStopTemp =
  			user_od_table_bak.OverDriveTable.FanZeroRpmStopTemp;
+ 		user_od_table->OverDriveTable.FanMode =
+ 			user_od_table_bak.OverDriveTable.FanMode;
+ 		user_od_table->OverDriveTable.FeatureCtrlMask = 0;
+ 	}
+ 	if (smu->adev->in_suspend) {
+ 		user_od_table->OverDriveTable.Ppt = 0;
+ 		smu->smu_table.user_od_feature_mask &=
+ 			~BIT(PP_OD_FEATURE_PPT_BIT);
  	}
  
  	smu_v14_0_2_set_supported_od_feature_mask(smu);
@@@ -2431,17 -2559,22 +2559,22 @@@ static int smu_v14_0_2_restore_user_od_
  	struct smu_table_context *table_context = &smu->smu_table;
  	OverDriveTableExternal_t *od_table = table_context->overdrive_table;
  	OverDriveTableExternal_t *user_od_table = table_context->user_overdrive_table;
+ 	OverDriveTableExternal_t upload_table;
+ 	u32 next_mask;
  	int res;
  
- 	user_od_table->OverDriveTable.FeatureCtrlMask = BIT(PP_OD_FEATURE_GFXCLK_BIT) |
- 							BIT(PP_OD_FEATURE_UCLK_BIT) |
- 							BIT(PP_OD_FEATURE_GFX_VF_CURVE_BIT) |
- 							BIT(PP_OD_FEATURE_FAN_CURVE_BIT) |
- 							BIT(PP_OD_FEATURE_ZERO_FAN_BIT);
- 	res = smu_v14_0_2_upload_overdrive_table(smu, user_od_table);
- 	user_od_table->OverDriveTable.FeatureCtrlMask = 0;
- 	if (res == 0)
+ 	next_mask = smu_v14_0_2_filter_od_feature_mask(smu,
+ 						       table_context->user_od_feature_mask);
+ 	memcpy(&upload_table, user_od_table, sizeof(upload_table));
+ 	upload_table.OverDriveTable.FeatureCtrlMask = next_mask;
+ 	res = smu_v14_0_2_upload_overdrive_table(smu, &upload_table);
+ 	if (res == 0) {
+ 		table_context->user_od_feature_mask = next_mask;
+ 		smu->user_dpm_profile.user_od =
+ 			!!(next_mask & ~BIT(PP_OD_FEATURE_PPT_BIT));
  		memcpy(od_table, user_od_table, sizeof(OverDriveTableExternal_t));
+ 		od_table->OverDriveTable.FeatureCtrlMask = 0;
+ 	}
  
  	return res;
  }
@@@ -2465,43 -2598,30 +2598,35 @@@ static int smu_v14_0_2_od_restore_table
  					boot_overdrive_table->OverDriveTable.FanLinearPwmPoints[i];
  		}
  		od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
- 		od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
- 		od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
  		break;
  	case PP_OD_EDIT_FAN_ZERO_RPM_ENABLE:
  		od_table->OverDriveTable.FanZeroRpmEnable =
  					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;
  		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;
- 		od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
- 		od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
  		break;
  	case PP_OD_EDIT_ACOUSTIC_TARGET:
  		od_table->OverDriveTable.AcousticTargetRpmThreshold =
  					boot_overdrive_table->OverDriveTable.AcousticTargetRpmThreshold;
- 		od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
- 		od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
  		break;
  	case PP_OD_EDIT_FAN_TARGET_TEMPERATURE:
  		od_table->OverDriveTable.FanTargetTemperature =
  					boot_overdrive_table->OverDriveTable.FanTargetTemperature;
- 		od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
- 		od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
  		break;
  	case PP_OD_EDIT_FAN_MINIMUM_PWM:
  		od_table->OverDriveTable.FanMinimumPwm =
  					boot_overdrive_table->OverDriveTable.FanMinimumPwm;
- 		od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
- 		od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
- 		od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
  		break;
  	default:
  		dev_info(adev->dev, "Invalid table index: %ld\n", input);
@@@ -2519,10 -2639,17 +2644,17 @@@ static int smu_v14_0_2_od_edit_dpm_tabl
  	struct smu_table_context *table_context = &smu->smu_table;
  	OverDriveTableExternal_t *od_table =
  		(OverDriveTableExternal_t *)table_context->overdrive_table;
+ 	OverDriveTableExternal_t *user_od_table =
+ 		(OverDriveTableExternal_t *)table_context->user_overdrive_table;
+ 	OverDriveTableExternal_t *boot_od_table =
+ 		(OverDriveTableExternal_t *)table_context->boot_overdrive_table;
+ 	OverDriveTableExternal_t upload_table;
+ 	OverDriveTable_t *od = &od_table->OverDriveTable;
+ 	OverDriveTable_t *boot = &boot_od_table->OverDriveTable;
  	struct amdgpu_device *adev = smu->adev;
  	uint32_t offset_of_voltageoffset;
  	int32_t minimum, maximum;
- 	uint32_t feature_ctrlmask;
+ 	u32 next_mask;
  	int i, ret = 0;
  
  	switch (type) {
@@@ -2694,6 -2821,7 +2826,7 @@@
  		od_table->OverDriveTable.AcousticLimitRpmThreshold = input[0];
  		od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
  		od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
+ 		od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
  		break;
  
  	case PP_OD_EDIT_ACOUSTIC_TARGET:
@@@ -2716,6 -2844,7 +2849,7 @@@
  		od_table->OverDriveTable.AcousticTargetRpmThreshold = input[0];
  		od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
  		od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
+ 		od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
  		break;
  
  	case PP_OD_EDIT_FAN_TARGET_TEMPERATURE:
@@@ -2738,6 -2867,7 +2872,7 @@@
  		od_table->OverDriveTable.FanTargetTemperature = input[0];
  		od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
  		od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
+ 		od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
  		break;
  
  	case PP_OD_EDIT_FAN_MINIMUM_PWM:
@@@ -2811,44 -2941,42 +2946,42 @@@
  			if (ret)
  				return ret;
  		} else {
- 			feature_ctrlmask = od_table->OverDriveTable.FeatureCtrlMask;
  			memcpy(od_table,
  		       table_context->boot_overdrive_table,
  		       sizeof(OverDriveTableExternal_t));
- 			od_table->OverDriveTable.FeatureCtrlMask = feature_ctrlmask;
+ 			od_table->OverDriveTable.FeatureCtrlMask = 0;
  		}
  		fallthrough;
  	case PP_OD_COMMIT_DPM_TABLE:
- 		/*
- 		 * The member below instructs PMFW the settings focused in
- 		 * this single operation.
- 		 * `uint32_t FeatureCtrlMask;`
- 		 * It does not contain actual informations about user's custom
- 		 * settings. Thus we do not cache it.
- 		 */
  		offset_of_voltageoffset = offsetof(OverDriveTable_t, VoltageOffsetPerZoneBoundary);
- 		if (memcmp((u8 *)od_table + offset_of_voltageoffset,
- 			   table_context->user_overdrive_table + offset_of_voltageoffset,
- 			   sizeof(OverDriveTableExternal_t) - offset_of_voltageoffset)) {
- 			smu_v14_0_2_dump_od_table(smu, od_table);
+ 		next_mask = smu_v14_0_2_get_od_feature_mask(smu,
+ 							    od->FeatureCtrlMask);
+ 		next_mask = smu_v14_0_2_normalize_feature_mask(od, boot,
+ 							       next_mask);
  
- 			ret = smu_v14_0_2_upload_overdrive_table(smu, od_table);
+ 		if (memcmp((u8 *)od_table + offset_of_voltageoffset,
+ 			   (u8 *)user_od_table + offset_of_voltageoffset,
+ 			   sizeof(OverDriveTableExternal_t) - offset_of_voltageoffset) ||
+ 		    next_mask != table_context->user_od_feature_mask) {
+ 			memcpy(&upload_table, od_table, sizeof(upload_table));
+ 			upload_table.OverDriveTable.FeatureCtrlMask = next_mask;
+ 			smu_v14_0_2_dump_od_table(smu, &upload_table);
+ 
+ 			ret = smu_v14_0_2_upload_overdrive_table(smu, &upload_table);
  			if (ret) {
  				dev_err(adev->dev, "Failed to upload overdrive table!\n");
  				return ret;
  			}
  
+ 			table_context->user_od_feature_mask = next_mask;
  			od_table->OverDriveTable.FeatureCtrlMask = 0;
- 			memcpy(table_context->user_overdrive_table + offset_of_voltageoffset,
+ 			memcpy((u8 *)user_od_table + offset_of_voltageoffset,
  			       (u8 *)od_table + offset_of_voltageoffset,
  			       sizeof(OverDriveTableExternal_t) - offset_of_voltageoffset);
+ 			user_od_table->OverDriveTable.FeatureCtrlMask = 0;
  
- 			if (!memcmp(table_context->user_overdrive_table,
- 				    table_context->boot_overdrive_table,
- 				    sizeof(OverDriveTableExternal_t)))
- 				smu->user_dpm_profile.user_od = false;
- 			else
- 				smu->user_dpm_profile.user_od = true;
+ 			smu->user_dpm_profile.user_od =
+ 				!!(next_mask & ~BIT(PP_OD_FEATURE_PPT_BIT));
  		}
  		break;
  
@@@ -2866,10 -2994,8 +2999,8 @@@ static int smu_v14_0_2_set_ppt_limit(st
  	PPTable_t *pptable = smu->smu_table.driver_pptable;
  	uint32_t msg_limit = pptable->SkuTable.MsgLimits.Power
  		[PPT_THROTTLER_PPT0][POWER_SOURCE_AC];
- 	struct smu_table_context *table_context = &smu->smu_table;
- 	OverDriveTableExternal_t *od_table =
- 		(OverDriveTableExternal_t *)table_context->overdrive_table;
  	OverDriveTableExternal_t current_od_table;
+ 	s16 ppt;
  	int ret = 0;
  
  	if (limit_type != SMU_PPT_LIMIT_PPT0)
@@@ -2881,10 -3007,7 +3012,7 @@@
  			return ret;
  
  		if (current_od_table.OverDriveTable.Ppt) {
- 			od_table->OverDriveTable.Ppt = 0;
- 			od_table->OverDriveTable.FeatureCtrlMask |= 1U << PP_OD_FEATURE_PPT_BIT;
- 
- 			ret = smu_v14_0_2_upload_overdrive_table(smu, od_table);
+ 			ret = smu_v14_0_2_upload_ppt_overdrive_table(smu, 0);
  			if (ret) {
  				dev_err(smu->adev->dev, "Failed to upload overdrive table!\n");
  				return ret;
@@@ -2896,10 -3019,8 +3024,8 @@@
  		if (ret)
  			return ret;
  
- 		od_table->OverDriveTable.Ppt = (limit * 100) / msg_limit - 100;
- 		od_table->OverDriveTable.FeatureCtrlMask |= 1U << PP_OD_FEATURE_PPT_BIT;
- 
- 		ret = smu_v14_0_2_upload_overdrive_table(smu, od_table);
+ 		ppt = (limit * 100) / msg_limit - 100;
+ 		ret = smu_v14_0_2_upload_ppt_overdrive_table(smu, ppt);
  		if (ret) {
  		  dev_err(smu->adev->dev, "Failed to upload overdrive table!\n");
  		  return ret;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-10-28 13:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 13:28 Mark Brown [this message]
2026-10-28 13:44 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2026-09-07 22:51 Mark Brown
2026-07-29 13:28 Mark Brown
2026-07-02 16:01 Mark Brown
2026-03-03 13:09 Mark Brown
2026-02-17 13:47 Mark Brown
2024-06-17 18:37 Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=auH4hkxipwOwNz44@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=kenneth.feng@amd.com \
    --cc=kevin.wang@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®