Skip to content

Commit f0b8f65

Browse files
Li Maalexdeucher
authored andcommitted
drm/amd/amdgpu: fix the GPU power print error in pm info
Modify the print format of the fractional part to avoid display error. Signed-off-by: Li Ma <li.ma@amd.com> Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d055714 commit f0b8f65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/pm/amdgpu_pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4290,10 +4290,10 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a
42904290
seq_printf(m, "\t%u mV (VDDNB)\n", value);
42914291
size = sizeof(uint32_t);
42924292
if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_AVG_POWER, (void *)&query, &size))
4293-
seq_printf(m, "\t%u.%u W (average GPU)\n", query >> 8, query & 0xff);
4293+
seq_printf(m, "\t%u.%02u W (average GPU)\n", query >> 8, query & 0xff);
42944294
size = sizeof(uint32_t);
42954295
if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_INPUT_POWER, (void *)&query, &size))
4296-
seq_printf(m, "\t%u.%u W (current GPU)\n", query >> 8, query & 0xff);
4296+
seq_printf(m, "\t%u.%02u W (current GPU)\n", query >> 8, query & 0xff);
42974297
size = sizeof(value);
42984298
seq_printf(m, "\n");
42994299

0 commit comments

Comments
 (0)