mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
drm/amd/powerplay: correct the value retrieved through GPU_LOAD sensor interface
the unit of variable AverageGfxActivity defined in smu12 metrics struct is centi, so the retrieved value should be divided by 100 before return. Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e304adc06e
commit
a0250689cb
1 changed files with 1 additions and 1 deletions
|
@ -492,7 +492,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");
|
||||
|
|
Loading…
Reference in a new issue