Skip to content

Commit 90dbc0b

Browse files
Yang Wangalexdeucher
authored andcommitted
drm/amd/pm: fix smu overdrive data type wrong issue on smu 14.0.2
resolving the issue of incorrect type definitions potentially causing calculation errors. Fixes: 54f7f3c ("drm/amdgpu/swm14: Update power limit logic") Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit e3a03d0)
1 parent 52d3d11 commit 90dbc0b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,8 +1702,9 @@ static int smu_v14_0_2_get_power_limit(struct smu_context *smu,
17021702
table_context->power_play_table;
17031703
PPTable_t *pptable = table_context->driver_pptable;
17041704
CustomSkuTable_t *skutable = &pptable->CustomSkuTable;
1705-
uint32_t power_limit, od_percent_upper = 0, od_percent_lower = 0;
1705+
int16_t od_percent_upper = 0, od_percent_lower = 0;
17061706
uint32_t msg_limit = pptable->SkuTable.MsgLimits.Power[PPT_THROTTLER_PPT0][POWER_SOURCE_AC];
1707+
uint32_t power_limit;
17071708

17081709
if (smu_v14_0_get_current_power_limit(smu, &power_limit))
17091710
power_limit = smu->adev->pm.ac_power ?

0 commit comments

Comments
 (0)