Skip to content

Commit a7dd9b9

Browse files
committed
drm/amd/pm: fix debugfs pm_info output
Print both input and avg power. Fixes: 47f1724 ("drm/amd: Introduce `AMDGPU_PP_SENSOR_GPU_INPUT_POWER`") Reviewed-by: Guchun Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 7d44243 commit a7dd9b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,6 +3471,9 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a
34713471
size = sizeof(uint32_t);
34723472
if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_AVG_POWER, (void *)&query, &size))
34733473
seq_printf(m, "\t%u.%u W (average GPU)\n", query >> 8, query & 0xff);
3474+
size = sizeof(uint32_t);
3475+
if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_INPUT_POWER, (void *)&query, &size))
3476+
seq_printf(m, "\t%u.%u W (current GPU)\n", query >> 8, query & 0xff);
34743477
size = sizeof(value);
34753478
seq_printf(m, "\n");
34763479

0 commit comments

Comments
 (0)