Skip to contentSkip to conversation

drm/amd/pm: correct the sensor value of power for vangogh

PATCH In review Xiaojian Du 2 participants 2 messages Dec 15, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/pm: correct the sensor value of power for vangogh

This patch is to correct the sensor value of power for vangogh.

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +2 -1
index 9bccf2ad038c..a33c1e07c5df 100644
@@ -252,7 +252,8 @@ static int vangogh_get_smu_metrics_data(struct smu_context *smu,
 		*value = metrics->UvdActivity;
 		break;
 	case METRICS_AVERAGE_SOCKETPOWER:
-		*value = metrics->CurrentSocketPower;
+		*value = (metrics->CurrentSocketPower << 8) /
+		1000 ;
 		break;
 	case METRICS_TEMPERATURE_EDGE:
 		*value = metrics->GfxTemperature / 100 *
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: Du, Xiaojian <[email protected]>
Sent: Tuesday, December 15, 2020 3:40 PM
To: [email protected]
Cc: Huang, Ray <[email protected]>; Quan, Evan <[email protected]>; Deucher, Alexander <[email protected]>; Wang, Kevin(Yang) <[email protected]>; Huang, Shimmer <[email protected]>; Lazar, Lijo <[email protected]>; Du, Xiaojian <[email protected]>
Subject: [PATCH] drm/amd/pm: correct the sensor value of power for vangogh

This patch is to correct the sensor value of power for vangogh.

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +2 -1
index 9bccf2ad038c..a33c1e07c5df 100644
@@ -252,7 +252,8 @@ static int vangogh_get_smu_metrics_data(struct smu_context *smu,
 *value = metrics->UvdActivity;
 break;
 case METRICS_AVERAGE_SOCKETPOWER:
-*value = metrics->CurrentSocketPower;
+*value = (metrics->CurrentSocketPower << 8) /
+1000 ;
 break;
 case METRICS_TEMPERATURE_EDGE:
 *value = metrics->GfxTemperature / 100 *

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx