Skip to content

Commit

Permalink
drm/radeon/dpm: implement vblank_too_short callback for 7xx
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 4878306 commit b06195d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
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 @@ -1394,6 +1394,7 @@ static struct radeon_asic rv770_asic = {
.print_power_state = &rv770_dpm_print_power_state,
.debugfs_print_current_performance_level = &rv770_dpm_debugfs_print_current_performance_level,
.force_performance_level = &rv770_dpm_force_performance_level,
.vblank_too_short = &rv770_dpm_vblank_too_short,
},
.pflip = {
.pre_page_flip = &rs600_pre_page_flip,
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/radeon/radeon_asic.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ void rv770_dpm_debugfs_print_current_performance_level(struct radeon_device *rde
struct seq_file *m);
int rv770_dpm_force_performance_level(struct radeon_device *rdev,
enum radeon_dpm_forced_level level);
bool rv770_dpm_vblank_too_short(struct radeon_device *rdev);

/*
* evergreen
Expand Down
11 changes: 11 additions & 0 deletions drivers/gpu/drm/radeon/rv770_dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2508,3 +2508,14 @@ u32 rv770_dpm_get_mclk(struct radeon_device *rdev, bool low)
else
return requested_state->high.mclk;
}

bool rv770_dpm_vblank_too_short(struct radeon_device *rdev)
{
u32 vblank_time = r600_dpm_get_vblank_time(rdev);

if (vblank_time < 300)
return true;
else
return false;

}

0 comments on commit b06195d

Please sign in to comment.