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

drm/amdgpu/soc15: fix xclk for raven

It's 25 Mhz (refclk / 4). This fixes the interpretation
of the rlc clock counter.

Acked-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

+6 -1
+6 -1
drivers/gpu/drm/amd/amdgpu/soc15.c
··· 272 272 273 273 static u32 soc15_get_xclk(struct amdgpu_device *adev) 274 274 { 275 - return adev->clock.spll.reference_freq; 275 + u32 reference_clock = adev->clock.spll.reference_freq; 276 + 277 + if (adev->asic_type == CHIP_RAVEN) 278 + return reference_clock / 4; 279 + 280 + return reference_clock; 276 281 } 277 282 278 283