Skip to contentSkip to conversation

drm/amd/pm: Fill ip version for SMU v13.0.12

PATCH In review Alex Deucher 2 participants 3 messages Jan 10, 2025 – Jan 11, 2025

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/2 drm/amd/pm: Fill ip version for SMU v13.0.12

From: Asad Kamal <[email protected]>

Fill ip version in pm_metrics for SMU v13.0.12

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +2 -0
index 8ab30b2f7119e..045a1a814c2a2 100644
@@ -603,6 +603,8 @@ static ssize_t smu_v13_0_6_get_pm_metrics(struct smu_context *smu,
 		pm_metrics->common_header.mp1_ip_discovery_version = IP_VERSION(13, 0, 6);
 	if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 14))
 		pm_metrics->common_header.mp1_ip_discovery_version = IP_VERSION(13, 0, 14);
+	if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 12))
+		pm_metrics->common_header.mp1_ip_discovery_version = IP_VERSION(13, 0, 12);
 	pm_metrics->common_header.pmfw_version = pmfw_version;
 	pm_metrics->common_header.pmmetrics_version = table_version;
 	pm_metrics->common_header.structure_size =
Signature · 1 line
2.47.1
author maintainer
#1 lore raw

PATCH 2/2 drm/amd/pm: Populate pmfw version for SMU v13.0.12

From: Asad Kamal <[email protected]>

Populate pmfw version for SMU v13.0.12 to device struct

v2: Remove ip version check to get smu version

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +1 -4
index fbbdfa54f6a20..0915d6377613b 100644
@@ -267,10 +267,7 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
 	smu_major = (smu_version >> 16) & 0xff;
 	smu_minor = (smu_version >> 8) & 0xff;
 	smu_debug = (smu_version >> 0) & 0xff;
-	if (smu->is_apu ||
-	    amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 6) ||
-	    amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 14))
-		adev->pm.fw_version = smu_version;
+	adev->pm.fw_version = smu_version;
 
 	/* only for dGPU w/ SMU13*/
 	if (adev->pm.fw)
Signature · 1 line
2.47.1
#2 lore raw
In reply to Alex Deucher
Quoted 16 lines · Alex Deucher

From: Asad Kamal <[email protected]>

Fill ip version in pm_metrics for SMU v13.0.12

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0 -0
index 8ab30b2f7119e..045a1a814c2a2 100644

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c static ssize_t smu_v13_0_6_get_pm_metrics(struct smu_context *smu, · line 607

Quoted 5 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +2 -0
@@ -603,6 +603,8 @@ static ssize_t smu_v13_0_6_get_pm_metrics(struct smu_context *smu,
 		pm_metrics->common_header.mp1_ip_discovery_version = IP_VERSION(13, 0, 6);
 	if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 14))
 		pm_metrics->common_header.mp1_ip_discovery_version = IP_VERSION(13, 0, 14);
+	if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 12))
+		pm_metrics->common_header.mp1_ip_discovery_version = IP_VERSION(13, 0, 12);

Please remove all if checks and keep

	pm_metrics->common_header.mp1_ip_discovery_version =

amdgpu_ip_version(smu->adev, MP1_HWIP, 0);

Thanks,
Lijo

Quoted 3 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0 -0
 	pm_metrics->common_header.pmfw_version = pmfw_version;
 	pm_metrics->common_header.pmmetrics_version = table_version;
 	pm_metrics->common_header.structure_size =