Skip to content

Commit 9cb744f

Browse files
Tom Chunggregkh
Tom Chung
authored andcommitted
drm/amd/display: Do not enable Replay and PSR while VRR is on in amdgpu_dm_commit_planes()
commit 69a46ce upstream. [Why] Replay and PSR will cause some video corruption while VRR is enabled. [How] Do not enable the Replay and PSR while VRR is active in amdgpu_dm_enable_self_refresh(). Fixes: 67edb81 ("drm/amd/display: Disable replay and psr while VRR is enabled") Reviewed-by: Sun peng Li <[email protected]> Signed-off-by: Tom Chung <[email protected]> Signed-off-by: Fangzhi Zuo <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a53d959 commit 9cb744f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ bool amdgpu_dm_crtc_vrr_active(const struct dm_crtc_state *dm_state)
113113
*
114114
* Panel Replay and PSR SU
115115
* - Enable when:
116+
* - VRR is disabled
116117
* - vblank counter is disabled
117118
* - entry is allowed: usermode demonstrates an adequate number of fast
118119
* commits)
@@ -131,19 +132,20 @@ static void amdgpu_dm_crtc_set_panel_sr_feature(
131132
bool is_sr_active = (link->replay_settings.replay_allow_active ||
132133
link->psr_settings.psr_allow_active);
133134
bool is_crc_window_active = false;
135+
bool vrr_active = amdgpu_dm_crtc_vrr_active_irq(vblank_work->acrtc);
134136

135137
#ifdef CONFIG_DRM_AMD_SECURE_DISPLAY
136138
is_crc_window_active =
137139
amdgpu_dm_crc_window_is_activated(&vblank_work->acrtc->base);
138140
#endif
139141

140-
if (link->replay_settings.replay_feature_enabled &&
142+
if (link->replay_settings.replay_feature_enabled && !vrr_active &&
141143
allow_sr_entry && !is_sr_active && !is_crc_window_active) {
142144
amdgpu_dm_replay_enable(vblank_work->stream, true);
143145
} else if (vblank_enabled) {
144146
if (link->psr_settings.psr_version < DC_PSR_VERSION_SU_1 && is_sr_active)
145147
amdgpu_dm_psr_disable(vblank_work->stream, false);
146-
} else if (link->psr_settings.psr_feature_enabled &&
148+
} else if (link->psr_settings.psr_feature_enabled && !vrr_active &&
147149
allow_sr_entry && !is_sr_active && !is_crc_window_active) {
148150

149151
struct amdgpu_dm_connector *aconn =

0 commit comments

Comments
 (0)