Skip to contentSkip to conversation

drm/amdgpu: Fix refclk reporting for SMU v13.0.6

PATCH In review Lijo Lazar 3 participants 4 messages Sep 6, 2023 – Sep 7, 2023

Subsystems (2)
lore
Share & tools
lore

Lijo Lazar

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix refclk reporting for SMU v13.0.6

SMU v13.0.6 SOCs have 100MHz reference clock.

---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -1
index f5be40d7ba36..28094cd7d9c2 100644
@@ -325,7 +325,8 @@ static u32 soc15_get_xclk(struct amdgpu_device *adev)
 	u32 reference_clock = adev->clock.spll.reference_freq;
 
 	if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 0) ||
-	    adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 1))
+	    adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 1) ||
+	    adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 6))
 		return 10000;
 	if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(10, 0, 0) ||
 	    adev->ip_versions[MP1_HWIP][0] == IP_VERSION(10, 0, 1))
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Regards
Hawking
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, September 6, 2023 11:57
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix refclk reporting for SMU v13.0.6

SMU v13.0.6 SOCs have 100MHz reference clock.

---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -1
index f5be40d7ba36..28094cd7d9c2 100644
@@ -325,7 +325,8 @@ static u32 soc15_get_xclk(struct amdgpu_device *adev)
        u32 reference_clock = adev->clock.spll.reference_freq;
 
        if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 0) ||
-           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 1))
+           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 1) ||
+           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 6))
                return 10000;
        if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(10, 0, 0) ||
            adev->ip_versions[MP1_HWIP][0] == IP_VERSION(10, 0, 1))

--
2.25.1

#2 lore raw
In reply to Lijo Lazar
Quoted 3 lines · Lijo Lazar

SMU v13.0.6 SOCs have 100MHz reference clock.

Do we want to use the vbios value on boards that have a vbios? If it's the same on all variants, then this is probably fine as is.

Alex

Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -2
index f5be40d7ba36..28094cd7d9c2 100644
@@ -325,7 +325,8 @@ static u32 soc15_get_xclk(struct amdgpu_device *adev)
        u32 reference_clock = adev->clock.spll.reference_freq;
 
        if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 0) ||
-           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 1))
+           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 1) ||
+           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 6))
                return 10000;
        if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(10, 0, 0) ||
            adev->ip_versions[MP1_HWIP][0] == IP_VERSION(10, 0, 1))
--

2.25.1

#3 lore raw
Quoted 8 lines · Alex Deucher
Quoted 3 lines · Lijo Lazar

SMU v13.0.6 SOCs have 100MHz reference clock.

Do we want to use the vbios value on boards that have a vbios? If it's the same on all variants, then this is probably fine as is.

Yes, it's the same for all variants.

Thanks,
Lijo

Quoted 24 lines

Alex

Quoted 22 lines
---
  drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -2
index f5be40d7ba36..28094cd7d9c2 100644
@@ -325,7 +325,8 @@ static u32 soc15_get_xclk(struct amdgpu_device *adev)
         u32 reference_clock = adev->clock.spll.reference_freq;
 
         if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 0) ||
-           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 1))
+           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(12, 0, 1) ||
+           adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 6))
                 return 10000;
         if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(10, 0, 0) ||
             adev->ip_versions[MP1_HWIP][0] == IP_VERSION(10, 0, 1))
--

2.25.1