Skip to content

Commit b447b07

Browse files
olvaffealexdeucher
authored andcommitted
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 982b173 commit b447b07

File tree

1 file changed

+9
-2
lines changed
  • drivers/gpu/drm/amd/amdgpu

1 file changed

+9
-2
lines changed

drivers/gpu/drm/amd/amdgpu/vi.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,15 @@ static u32 vi_get_xclk(struct amdgpu_device *adev)
542542
u32 reference_clock = adev->clock.spll.reference_freq;
543543
u32 tmp;
544544

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+
}
547554

548555
tmp = RREG32_SMC(ixCG_CLKPIN_CNTL_2);
549556
if (REG_GET_FIELD(tmp, CG_CLKPIN_CNTL_2, MUX_TCLK_TO_XCLK))

0 commit comments

Comments
 (0)