diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-07-15 17:34:33 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-08-30 16:30:30 -0400 |
commit | 94b4adc5ae30fb451300bdca901ae9771f6baf5f (patch) | |
tree | dca7f6055716a837cace69cb824e416c74ec1c93 /drivers/gpu/drm/radeon/ci_dpm.c | |
parent | cc8dbbb4f62aa53e604e7c61dedc03ee4e8dfed4 (diff) | |
download | op-kernel-dev-94b4adc5ae30fb451300bdca901ae9771f6baf5f.zip op-kernel-dev-94b4adc5ae30fb451300bdca901ae9771f6baf5f.tar.gz |
drm/radeon/dpm: add debugfs support for CI
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/ci_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/ci_dpm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index 72ab92b..28b2b36 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -27,6 +27,7 @@ #include "r600_dpm.h" #include "ci_dpm.h" #include "atom.h" +#include <linux/seq_file.h> #define MC_CG_ARB_FREQ_F0 0x0a #define MC_CG_ARB_FREQ_F1 0x0b @@ -4965,6 +4966,16 @@ int ci_dpm_init(struct radeon_device *rdev) return 0; } +void ci_dpm_debugfs_print_current_performance_level(struct radeon_device *rdev, + struct seq_file *m) +{ + u32 sclk = ci_get_average_sclk_freq(rdev); + u32 mclk = ci_get_average_mclk_freq(rdev); + + seq_printf(m, "power level avg sclk: %u mclk: %u\n", + sclk, mclk); +} + void ci_dpm_print_power_state(struct radeon_device *rdev, struct radeon_ps *rps) { |