Skip to contentSkip to conversation

drm/amd/pm: Remove unnecessay UQ10 to UINT conversion

PATCH In review Asad Kamal 2 participants 3 messages Mar 20, 2025

Subsystems (3)
lore
Share & tools
lore

Asad Kamal

author
#0 lore raw

PATCH v2 1/2 drm/amd/pm: Remove unnecessay UQ10 to UINT conversion

Few of the metrics data for smu_v13_0_6 has not been reported in Q10 format, remove UQ10 to UINT conversion for those

v2: Move smu_v13_0_12 changes to separate patch(Kevin)

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +2 -2
index ce941ffa1715..e8707ca513e9 100644
@@ -2695,8 +2695,8 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **table
 		}
 	}
 
-	gpu_metrics->xgmi_link_width = SMUQ10_ROUND(GET_METRIC_FIELD(XgmiWidth, version));
-	gpu_metrics->xgmi_link_speed = SMUQ10_ROUND(GET_METRIC_FIELD(XgmiBitrate, version));
+	gpu_metrics->xgmi_link_width = GET_METRIC_FIELD(XgmiWidth, version);
+	gpu_metrics->xgmi_link_speed = GET_METRIC_FIELD(XgmiBitrate, version);
 
 	gpu_metrics->firmware_timestamp = GET_METRIC_FIELD(Timestamp, version);
 
Signature · 1 line
2.46.0
author
#1 lore raw

PATCH v2 2/2 drm/amd/pm: Remove unnecessay UQ10 to UINT conversion

Few of the metrics data for smu_v13_0_12 has not been reported in Q10 format, remove UQ10 to UINT conversion for those

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +2 -2
index 12ee8d07d0c8..5d4437e413cc 100644
@@ -488,8 +488,8 @@ ssize_t smu_v13_0_12_get_gpu_metrics(struct smu_context *smu, void **table)
 		}
 	}
 
-	gpu_metrics->xgmi_link_width = SMUQ10_ROUND(metrics->XgmiWidth);
-	gpu_metrics->xgmi_link_speed = SMUQ10_ROUND(metrics->XgmiBitrate);
+	gpu_metrics->xgmi_link_width = metrics->XgmiWidth;
+	gpu_metrics->xgmi_link_speed = metrics->XgmiBitrate;
 
 	gpu_metrics->firmware_timestamp = metrics->Timestamp;
 
Signature · 1 line
2.46.0
Reviewed-by Reviewed-by Lijo Lazar on v2 2/2
#2 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Series is

Regards,
Hawking
-----Original Message-----
From: Kamal, Asad <[email protected]>
Sent: Thursday, March 20, 2025 15:04
To: [email protected]; Lazar, Lijo <[email protected]>
Cc: Zhang, Hawking <[email protected]>; Ma, Le <[email protected]>; Zhang, Morris <[email protected]>; Kamal, Asad <[email protected]>; Deucher, Alexander <[email protected]>; Wang, Yang(Kevin) <[email protected]>
Subject: [PATCH v2 2/2] drm/amd/pm: Remove unnecessay UQ10 to UINT conversion

Few of the metrics data for smu_v13_0_12 has not been reported in Q10 format, remove UQ10 to UINT conversion for those

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +2 -2
index 12ee8d07d0c8..5d4437e413cc 100644
@@ -488,8 +488,8 @@ ssize_t smu_v13_0_12_get_gpu_metrics(struct smu_context *smu, void **table)
                }
        }
 
-       gpu_metrics->xgmi_link_width = SMUQ10_ROUND(metrics->XgmiWidth);
-       gpu_metrics->xgmi_link_speed = SMUQ10_ROUND(metrics->XgmiBitrate);
+       gpu_metrics->xgmi_link_width = metrics->XgmiWidth;
+       gpu_metrics->xgmi_link_speed = metrics->XgmiBitrate;
 
        gpu_metrics->firmware_timestamp = metrics->Timestamp;
 

--
2.46.0