Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.0.x, 6.1.x

authored by

Evan Quan and committed by
Alex Deucher
6fea8763 93235bfd

+2 -2
+2 -2
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
··· 1261 1261 uint32_t speed) 1262 1262 { 1263 1263 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; 1265 1266 int ret; 1266 1267 1267 1268 if (!speed) ··· 1272 1271 if (ret) 1273 1272 return ret; 1274 1273 1275 - crystal_clock_freq = amdgpu_asic_get_xclk(adev); 1276 1274 tach_period = 60 * crystal_clock_freq * 10000 / (8 * speed); 1277 1275 WREG32_SOC15(THM, 0, regCG_TACH_CTRL, 1278 1276 REG_SET_FIELD(RREG32_SOC15(THM, 0, regCG_TACH_CTRL),