diff options
| author | Alex Deucher <[email protected]> | 2023-08-18 19:18:07 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-08-30 19:19:24 +0000 |
| commit | e0e1764a3a05ff2d3f60ae42feccd43f0d546d39 (patch) | |
| tree | 9f442c25ea6e82220d0cc946f2bc6b28c8f0a387 /drivers/gpu/drm/amd/pm/amdgpu_pm.c | |
| parent | drm/amdkfd: Share the original BO for GTT mapping (diff) | |
| download | kernel-e0e1764a3a05ff2d3f60ae42feccd43f0d546d39.tar.gz kernel-e0e1764a3a05ff2d3f60ae42feccd43f0d546d39.zip | |
drm/amd/pm: fix debugfs pm_info output
Print both input and avg power.
Fixes: 47f1724db4fe ("drm/amd: Introduce `AMDGPU_PP_SENSOR_GPU_INPUT_POWER`")
Reviewed-by: Guchun Chen <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/amdgpu_pm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index f03647fa3df6..41147da54458 100644 --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c @@ -3471,6 +3471,9 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a 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); + 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); size = sizeof(value); seq_printf(m, "\n"); |
