aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-07-08 12:15:11 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-07-08 17:41:11 -0400
commitf4dec31861e938267d41a962f145edc7d81c8e92 (patch)
tree897575f0e233182232512d0eecf9d7d36d88b55a /drivers/gpu/drm
parent76ad73e549ff39cbb235dae3a14902bb6ca12d53 (diff)
drm/radeon/dpm: implement vblank_too_short callback for si
Check if we can switch the mclk during the vblank time otherwise we may get artifacts on the screen when the mclk changes. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/ni_dpm.h2
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.c1
-rw-r--r--drivers/gpu/drm/radeon/si_dpm.c3
3 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/ni_dpm.h b/drivers/gpu/drm/radeon/ni_dpm.h
index ac1c7abf2c67..6bbee9180909 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.h
+++ b/drivers/gpu/drm/radeon/ni_dpm.h
@@ -245,4 +245,6 @@ void ni_set_uvd_clock_after_set_eng_clock(struct radeon_device *rdev,
245 struct radeon_ps *new_ps, 245 struct radeon_ps *new_ps,
246 struct radeon_ps *old_ps); 246 struct radeon_ps *old_ps);
247 247
248bool ni_dpm_vblank_too_short(struct radeon_device *rdev);
249
248#endif 250#endif
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index c62428be9bed..097077499cc6 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -2294,6 +2294,7 @@ static struct radeon_asic si_asic = {
2294 .print_power_state = &ni_dpm_print_power_state, 2294 .print_power_state = &ni_dpm_print_power_state,
2295 .debugfs_print_current_performance_level = &si_dpm_debugfs_print_current_performance_level, 2295 .debugfs_print_current_performance_level = &si_dpm_debugfs_print_current_performance_level,
2296 .force_performance_level = &si_dpm_force_performance_level, 2296 .force_performance_level = &si_dpm_force_performance_level,
2297 .vblank_too_short = &ni_dpm_vblank_too_short,
2297 }, 2298 },
2298 .pflip = { 2299 .pflip = {
2299 .pre_page_flip = &evergreen_pre_page_flip, 2300 .pre_page_flip = &evergreen_pre_page_flip,
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 700a167be369..73aaa2e4c312 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -2906,7 +2906,8 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
2906 u16 vddc, vddci; 2906 u16 vddc, vddci;
2907 int i; 2907 int i;
2908 2908
2909 if (rdev->pm.dpm.new_active_crtc_count > 1) 2909 if ((rdev->pm.dpm.new_active_crtc_count > 1) ||
2910 ni_dpm_vblank_too_short(rdev))
2910 disable_mclk_switching = true; 2911 disable_mclk_switching = true;
2911 else 2912 else
2912 disable_mclk_switching = false; 2913 disable_mclk_switching = false;