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

Quan, Evan Evan.Quan at amd.com
Tue Dec 15 09:01:47 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan <evan.quan at amd.com>

-----Original Message-----
From: Du, Xiaojian <Xiaojian.Du at amd.com>
Sent: Tuesday, December 15, 2020 3:40 PM
To: amd-gfx at lists.freedesktop.org
Cc: Huang, Ray <Ray.Huang at amd.com>; Quan, Evan <Evan.Quan at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Wang, Kevin(Yang) <Kevin1.Wang at amd.com>; Huang, Shimmer <Xinmei.Huang at amd.com>; Lazar, Lijo <Lijo.Lazar at amd.com>; Du, Xiaojian <Xiaojian.Du at amd.com>
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.

Signed-off-by: Xiaojian Du <Xiaojian.Du at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
index 9bccf2ad038c..a33c1e07c5df 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -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



More information about the amd-gfx mailing list