[PATCH] drm/admgpu: Set reference clock to 100Mhz on Renoir

Alex Deucher alexdeucher at gmail.com
Wed Feb 17 20:26:06 UTC 2021


Fixes the rlc reference clock used for GPU timestamps.
Hardcode for now.  The proper fix would be to look up
the values from the proper vbios table.  This will be
in a follow up patch.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1480
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index c7d0e0e98391..230caaa3513f 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -463,6 +463,8 @@ static u32 soc15_get_xclk(struct amdgpu_device *adev)
 {
 	u32 reference_clock = adev->clock.spll.reference_freq;
 
+	if (adev->asic_type == CHIP_RENOIR)
+		return 10000;
 	if (adev->asic_type == CHIP_RAVEN)
 		return reference_clock / 4;
 
-- 
2.29.2



More information about the amd-gfx mailing list