aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rv6xx_dpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/rv6xx_dpm.c')
-rw-r--r--drivers/gpu/drm/radeon/rv6xx_dpm.c25
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,
2027 r600_dpm_print_ps_status(rdev, rps); 2027 r600_dpm_print_ps_status(rdev, rps);
2028} 2028}
2029 2029
2030void rv6xx_dpm_debugfs_print_current_performance_level(struct radeon_device *rdev,
2031 struct seq_file *m)
2032{
2033 struct radeon_ps *rps = rdev->pm.dpm.current_ps;
2034 struct rv6xx_ps *ps = rv6xx_get_ps(rps);
2035 struct rv6xx_pl *pl;
2036 u32 current_index =
2037 (RREG32(TARGET_AND_CURRENT_PROFILE_INDEX) & CURRENT_PROFILE_INDEX_MASK) >>
2038 CURRENT_PROFILE_INDEX_SHIFT;
2039
2040 if (current_index > 2) {
2041 seq_printf(m, "invalid dpm profile %d\n", current_index);
2042 } else {
2043 if (current_index == 0)
2044 pl = &ps->low;
2045 else if (current_index == 1)
2046 pl = &ps->medium;
2047 else /* current_index == 2 */
2048 pl = &ps->high;
2049 seq_printf(m, "uvd vclk: %d dclk: %d\n", rps->vclk, rps->dclk);
2050 seq_printf(m, "power level %d sclk: %u mclk: %u vddc: %u\n",
2051 current_index, pl->sclk, pl->mclk, pl->vddc);
2052 }
2053}
2054
2030void rv6xx_dpm_fini(struct radeon_device *rdev) 2055void rv6xx_dpm_fini(struct radeon_device *rdev)
2031{ 2056{
2032 int i; 2057 int i;