mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
drm/amdgpu/soc21: fix xclk for APUs
The reference clock is supposed to be 100Mhz, but it
appears to actually be slightly lower (99.81Mhz).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14451
Reviewed-by: Jesse Zhang <Jesse.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 637fee3954)
Cc: stable@vger.kernel.org
This commit is contained in:
parent
acecfee885
commit
e7fbff9e76
|
|
@ -225,7 +225,13 @@ static u32 soc21_get_config_memsize(struct amdgpu_device *adev)
|
|||
|
||||
static u32 soc21_get_xclk(struct amdgpu_device *adev)
|
||||
{
|
||||
return adev->clock.spll.reference_freq;
|
||||
u32 reference_clock = adev->clock.spll.reference_freq;
|
||||
|
||||
/* reference clock is actually 99.81 Mhz rather than 100 Mhz */
|
||||
if ((adev->flags & AMD_IS_APU) && reference_clock == 10000)
|
||||
return 9981;
|
||||
|
||||
return reference_clock;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user