summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2020-02-12 07:46:16 +0100
committerAlex Deucher <alexander.deucher@amd.com>2020-02-12 22:04:40 +0100
commitb90c4d667c7e37b7265a92254a66492c1ad8bd2e (patch)
tree74c200a699b677f2487252925f815392905bafb8
parentdrm/amdgpu/display move get_num_odm_splits() into dc_resource.c (diff)
downloadlinux-b90c4d667c7e37b7265a92254a66492c1ad8bd2e.tar.xz
linux-b90c4d667c7e37b7265a92254a66492c1ad8bd2e.zip
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>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/soc15.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 15f3424a1ff7..2b488dfb2f21 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -272,7 +272,12 @@ static u32 soc15_get_config_memsize(struct amdgpu_device *adev)
static u32 soc15_get_xclk(struct amdgpu_device *adev)
{
- return adev->clock.spll.reference_freq;
+ u32 reference_clock = adev->clock.spll.reference_freq;
+
+ if (adev->asic_type == CHIP_RAVEN)
+ return reference_clock / 4;
+
+ return reference_clock;
}