Skip to content

Commit 2bb5b5f

Browse files
khfengalexdeucher
authored andcommitted
drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected
Screen flickers rapidly when two 4K 60Hz monitors are in use. This issue doesn't happen when one monitor is 4K 60Hz (pixelclock 594MHz) and another one is 4K 30Hz (pixelclock 297MHz). The issue is gone after setting "power_dpm_force_performance_level" to "high". Following the indication, we found that the issue occurs when sclk is too low. So resolve the issue by disabling sclk switching when there are two monitors requires high pixelclock (> 297MHz). v2: - Only apply the fix to Oland. Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a9a76be commit 2bb5b5f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

drivers/gpu/drm/radeon/radeon.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,7 @@ struct radeon_dpm {
15491549
void *priv;
15501550
u32 new_active_crtcs;
15511551
int new_active_crtc_count;
1552+
int high_pixelclock_count;
15521553
u32 current_active_crtcs;
15531554
int current_active_crtc_count;
15541555
bool single_display;

drivers/gpu/drm/radeon/radeon_pm.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,7 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev)
17671767
struct drm_device *ddev = rdev->ddev;
17681768
struct drm_crtc *crtc;
17691769
struct radeon_crtc *radeon_crtc;
1770+
struct radeon_connector *radeon_connector;
17701771

17711772
if (!rdev->pm.dpm_enabled)
17721773
return;
@@ -1776,13 +1777,20 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev)
17761777
/* update active crtc counts */
17771778
rdev->pm.dpm.new_active_crtcs = 0;
17781779
rdev->pm.dpm.new_active_crtc_count = 0;
1780+
rdev->pm.dpm.high_pixelclock_count = 0;
17791781
if (rdev->num_crtc && rdev->mode_info.mode_config_initialized) {
17801782
list_for_each_entry(crtc,
17811783
&ddev->mode_config.crtc_list, head) {
17821784
radeon_crtc = to_radeon_crtc(crtc);
17831785
if (crtc->enabled) {
17841786
rdev->pm.dpm.new_active_crtcs |= (1 << radeon_crtc->crtc_id);
17851787
rdev->pm.dpm.new_active_crtc_count++;
1788+
if (!radeon_crtc->connector)
1789+
continue;
1790+
1791+
radeon_connector = to_radeon_connector(radeon_crtc->connector);
1792+
if (radeon_connector->pixelclock_for_modeset > 297000)
1793+
rdev->pm.dpm.high_pixelclock_count++;
17861794
}
17871795
}
17881796
}

drivers/gpu/drm/radeon/si_dpm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2979,6 +2979,9 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
29792979
(rdev->pdev->device == 0x6605)) {
29802980
max_sclk = 75000;
29812981
}
2982+
2983+
if (rdev->pm.dpm.high_pixelclock_count > 1)
2984+
disable_sclk_switching = true;
29822985
}
29832986

29842987
if (rps->vce_active) {

0 commit comments

Comments
 (0)