aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaojian Du <[email protected]>2020-12-14 17:05:55 +0800
committerAlex Deucher <[email protected]>2021-01-06 16:02:45 -0500
commit0e61f09af48beb41be0954e7be7d3ba2d18c9946 (patch)
treea52e6f62ae3756551e2db2054c414a9ee88de9b4
parent5b2fc08c455bbf749489254a81baeffdf4c0a693 (diff)
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 <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c3
1 files changed, 2 insertions, 1 deletions
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 8cb4fcee9a2c..5c1482d4ca43 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 *