mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
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 <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
This commit is contained in:
1 parent
d055714a21
commit
f0b8f65b48
1 file changed
+2
-2
@@ -4290,10 +4290,10 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a
|
||||
seq_printf(m, "\t%u mV (VDDNB)\n", value);
|
||||
size = sizeof(uint32_t);
|
||||
if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_AVG_POWER, (void *)&query, &size))
|
||||
seq_printf(m, "\t%u.%u W (average GPU)\n", query >> 8, query & 0xff);
|
||||
seq_printf(m, "\t%u.%02u W (average GPU)\n", query >> 8, query & 0xff);
|
||||
size = sizeof(uint32_t);
|
||||
if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_INPUT_POWER, (void *)&query, &size))
|
||||
seq_printf(m, "\t%u.%u W (current GPU)\n", query >> 8, query & 0xff);
|
||||
seq_printf(m, "\t%u.%02u W (current GPU)\n", query >> 8, query & 0xff);
|
||||
size = sizeof(value);
|
||||
seq_printf(m, "\n");
|
||||
|
||||
|
||||
Reference in new issue
Block a user