[PATCH 4/4] drm/amd/powerplay: correct the value retrieved through GPU_LOAD sensor interface
Xiaomeng Hou
Xiaomeng.Hou at amd.com
Thu Dec 5 11:50:31 UTC 2019
the unit of variable AverageGfxActivity defined in smu12 metrics
struct is centi, so the retrieved value should be divided by 100 before
return.
Change-Id: Ia7873597977cb5479b015d632ab24a7aa20a1cfb
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou at amd.com>
---
drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
index 1e6b79cff23c..8fe8fefcbbbf 100644
--- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
@@ -509,7 +509,7 @@ static int renoir_get_current_activity_percent(struct smu_context *smu,
switch (sensor) {
case AMDGPU_PP_SENSOR_GPU_LOAD:
- *value = metrics.AverageGfxActivity;
+ *value = metrics.AverageGfxActivity / 100;
break;
default:
pr_err("Invalid sensor for retrieving clock activity\n");
--
2.24.0
More information about the amd-gfx
mailing list