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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: fix xclk freq on CHIP_STONEY

According to Alex, most APUs from that time seem to have the same issue
(vbios says 48Mhz, actual is 100Mhz). I only have a CHIP_STONEY so I
limit the fixup to CHIP_STONEY

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Chia-I Wu and committed by
Alex Deucher
5a863904 e6850f98

+9 -2
+9 -2
drivers/gpu/drm/amd/amdgpu/vi.c
··· 542 542 u32 reference_clock = adev->clock.spll.reference_freq; 543 543 u32 tmp; 544 544 545 - if (adev->flags & AMD_IS_APU) 546 - return reference_clock; 545 + if (adev->flags & AMD_IS_APU) { 546 + switch (adev->asic_type) { 547 + case CHIP_STONEY: 548 + /* vbios says 48Mhz, but the actual freq is 100Mhz */ 549 + return 10000; 550 + default: 551 + return reference_clock; 552 + } 553 + } 547 554 548 555 tmp = RREG32_SMC(ixCG_CLKPIN_CNTL_2); 549 556 if (REG_GET_FIELD(tmp, CG_CLKPIN_CNTL_2, MUX_TCLK_TO_XCLK))