diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-06-28 14:20:53 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-07-01 16:08:24 -0400 |
commit | 242916a5ee55a0ed49a2c74ee4d835fe9d8ca463 (patch) | |
tree | d10974d8f8b7b979d0cf912ab06d3f46f0fb36e2 /drivers/gpu/drm/radeon/rv6xx_dpm.c | |
parent | 1316b79256062f7a2e66f0833dcb9728ec748805 (diff) | |
download | linux-stable-242916a5ee55a0ed49a2c74ee4d835fe9d8ca463.tar.gz linux-stable-242916a5ee55a0ed49a2c74ee4d835fe9d8ca463.tar.bz2 linux-stable-242916a5ee55a0ed49a2c74ee4d835fe9d8ca463.zip |
drm/radeon/dpm: add debugfs support for rv6xx
This allows you to look at the current DPM state via
debugfs.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rv6xx_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rv6xx_dpm.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/rv6xx_dpm.c b/drivers/gpu/drm/radeon/rv6xx_dpm.c index 0e8b7d9b954b..33705c5c8369 100644 --- a/drivers/gpu/drm/radeon/rv6xx_dpm.c +++ b/drivers/gpu/drm/radeon/rv6xx_dpm.c @@ -2027,6 +2027,31 @@ void rv6xx_dpm_print_power_state(struct radeon_device *rdev, r600_dpm_print_ps_status(rdev, rps); } +void rv6xx_dpm_debugfs_print_current_performance_level(struct radeon_device *rdev, + struct seq_file *m) +{ + struct radeon_ps *rps = rdev->pm.dpm.current_ps; + struct rv6xx_ps *ps = rv6xx_get_ps(rps); + struct rv6xx_pl *pl; + u32 current_index = + (RREG32(TARGET_AND_CURRENT_PROFILE_INDEX) & CURRENT_PROFILE_INDEX_MASK) >> + CURRENT_PROFILE_INDEX_SHIFT; + + if (current_index > 2) { + seq_printf(m, "invalid dpm profile %d\n", current_index); + } else { + if (current_index == 0) + pl = &ps->low; + else if (current_index == 1) + pl = &ps->medium; + else /* current_index == 2 */ + pl = &ps->high; + seq_printf(m, "uvd vclk: %d dclk: %d\n", rps->vclk, rps->dclk); + seq_printf(m, "power level %d sclk: %u mclk: %u vddc: %u\n", + current_index, pl->sclk, pl->mclk, pl->vddc); + } +} + void rv6xx_dpm_fini(struct radeon_device *rdev) { int i; |