Skip to content

Commit 6fea876

Browse files
Evan Quanalexdeucher
authored andcommitted
drm/amd/pm: correct the reference clock for fan speed(rpm) calculation
Correct the reference clock as 25Mhz for SMU13 fan speed calculation. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.0.x, 6.1.x
1 parent 93235bf commit 6fea876

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,8 @@ int smu_v13_0_set_fan_speed_rpm(struct smu_context *smu,
12611261
uint32_t speed)
12621262
{
12631263
struct amdgpu_device *adev = smu->adev;
1264-
uint32_t tach_period, crystal_clock_freq;
1264+
uint32_t crystal_clock_freq = 2500;
1265+
uint32_t tach_period;
12651266
int ret;
12661267

12671268
if (!speed)
@@ -1271,7 +1272,6 @@ int smu_v13_0_set_fan_speed_rpm(struct smu_context *smu,
12711272
if (ret)
12721273
return ret;
12731274

1274-
crystal_clock_freq = amdgpu_asic_get_xclk(adev);
12751275
tach_period = 60 * crystal_clock_freq * 10000 / (8 * speed);
12761276
WREG32_SOC15(THM, 0, regCG_TACH_CTRL,
12771277
REG_SET_FIELD(RREG32_SOC15(THM, 0, regCG_TACH_CTRL),

0 commit comments

Comments
 (0)