Skip to content

Commit

Permalink
drm/radeon/dpm: implement vblank_too_short callback for si
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Deucher committed Jul 8, 2013
1 parent 76ad73e commit f4dec31
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/radeon/ni_dpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,6 @@ void ni_set_uvd_clock_after_set_eng_clock(struct radeon_device *rdev,
struct radeon_ps *new_ps,
struct radeon_ps *old_ps);

bool ni_dpm_vblank_too_short(struct radeon_device *rdev);

#endif
1 change: 1 addition & 0 deletions drivers/gpu/drm/radeon/radeon_asic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2294,6 +2294,7 @@ static struct radeon_asic si_asic = {
.print_power_state = &ni_dpm_print_power_state,
.debugfs_print_current_performance_level = &si_dpm_debugfs_print_current_performance_level,
.force_performance_level = &si_dpm_force_performance_level,
.vblank_too_short = &ni_dpm_vblank_too_short,
},
.pflip = {
.pre_page_flip = &evergreen_pre_page_flip,
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/radeon/si_dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2906,7 +2906,8 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
u16 vddc, vddci;
int i;

if (rdev->pm.dpm.new_active_crtc_count > 1)
if ((rdev->pm.dpm.new_active_crtc_count > 1) ||
ni_dpm_vblank_too_short(rdev))
disable_mclk_switching = true;
else
disable_mclk_switching = false;
Expand Down

0 comments on commit f4dec31

Please sign in to comment.