drm/radeon/dpm: implement vblank_too_short callback for cayman
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>
This commit is contained in:
Родитель
a84301c65d
Коммит
76ad73e549
|
@ -765,6 +765,19 @@ static void ni_calculate_leakage_for_v_and_t(struct radeon_device *rdev,
|
||||||
ni_calculate_leakage_for_v_and_t_formula(coeff, v, t, i_leakage, leakage);
|
ni_calculate_leakage_for_v_and_t_formula(coeff, v, t, i_leakage, leakage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ni_dpm_vblank_too_short(struct radeon_device *rdev)
|
||||||
|
{
|
||||||
|
struct rv7xx_power_info *pi = rv770_get_pi(rdev);
|
||||||
|
u32 vblank_time = r600_dpm_get_vblank_time(rdev);
|
||||||
|
u32 switch_limit = pi->mem_gddr5 ? 450 : 300;
|
||||||
|
|
||||||
|
if (vblank_time < switch_limit)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static void ni_apply_state_adjust_rules(struct radeon_device *rdev,
|
static void ni_apply_state_adjust_rules(struct radeon_device *rdev,
|
||||||
struct radeon_ps *rps)
|
struct radeon_ps *rps)
|
||||||
{
|
{
|
||||||
|
@ -775,7 +788,8 @@ static void ni_apply_state_adjust_rules(struct radeon_device *rdev,
|
||||||
u16 vddc, vddci;
|
u16 vddc, vddci;
|
||||||
int i;
|
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;
|
disable_mclk_switching = true;
|
||||||
else
|
else
|
||||||
disable_mclk_switching = false;
|
disable_mclk_switching = false;
|
||||||
|
|
|
@ -1945,6 +1945,7 @@ static struct radeon_asic cayman_asic = {
|
||||||
.print_power_state = &ni_dpm_print_power_state,
|
.print_power_state = &ni_dpm_print_power_state,
|
||||||
.debugfs_print_current_performance_level = &ni_dpm_debugfs_print_current_performance_level,
|
.debugfs_print_current_performance_level = &ni_dpm_debugfs_print_current_performance_level,
|
||||||
.force_performance_level = &ni_dpm_force_performance_level,
|
.force_performance_level = &ni_dpm_force_performance_level,
|
||||||
|
.vblank_too_short = &ni_dpm_vblank_too_short,
|
||||||
},
|
},
|
||||||
.pflip = {
|
.pflip = {
|
||||||
.pre_page_flip = &evergreen_pre_page_flip,
|
.pre_page_flip = &evergreen_pre_page_flip,
|
||||||
|
|
|
@ -624,6 +624,7 @@ void ni_dpm_debugfs_print_current_performance_level(struct radeon_device *rdev,
|
||||||
struct seq_file *m);
|
struct seq_file *m);
|
||||||
int ni_dpm_force_performance_level(struct radeon_device *rdev,
|
int ni_dpm_force_performance_level(struct radeon_device *rdev,
|
||||||
enum radeon_dpm_forced_level level);
|
enum radeon_dpm_forced_level level);
|
||||||
|
bool ni_dpm_vblank_too_short(struct radeon_device *rdev);
|
||||||
int trinity_dpm_init(struct radeon_device *rdev);
|
int trinity_dpm_init(struct radeon_device *rdev);
|
||||||
int trinity_dpm_enable(struct radeon_device *rdev);
|
int trinity_dpm_enable(struct radeon_device *rdev);
|
||||||
void trinity_dpm_disable(struct radeon_device *rdev);
|
void trinity_dpm_disable(struct radeon_device *rdev);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче