Skip to contentSkip to conversation

drm/amd/display: Fix artifacting on eDP panels when engaging freesync video mode

PATCH Superseded Aurabindo Pillai 2 participants 2 messages May 17, 2023 – May 18, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Fix artifacting on eDP panels when engaging freesync video mode

Additional checks are necessary related to stream and scaling changes before setting freesync video mode when an eDP panel is in use, otherwise it can create artifacts on the panel.

Fixes 541d54055b75 ("drm/amd/display: Fix hang when skipping modeset")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
index 14b296e1d0f6..7f322b18eda6 100644
@@ -9285,6 +9285,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
 
 		/* Now check if we should set freesync video mode */
 		if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream &&
+		    dc_is_stream_unchanged(new_stream, dm_old_crtc_state->stream) &&
+		    dc_is_stream_scaling_unchanged(new_stream, dm_old_crtc_state->stream) &&
 		    is_timing_unchanged_for_freesync(new_crtc_state,
 						     old_crtc_state)) {
 			new_crtc_state->mode_changed = false;
Signature · 1 line
2.40.1
#1 lore raw
Quoted 3 lines · Aurabindo Pillai

Additional checks are necessary related to stream and scaling changes before setting freesync video mode when an eDP panel is in use, otherwise it can create artifacts on the panel.

Hi Jay,

Could you expand the commit message to elaborate more about the bug (when it happens and how it looks like) and describe why the extra DC check is necessary?

Thanks
Siqueira

Quoted 21 lines
Fixes 541d54055b75 ("drm/amd/display: Fix hang when skipping modeset")
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
index 14b296e1d0f6..7f322b18eda6 100644
@@ -9285,6 +9285,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
 
  		/* Now check if we should set freesync video mode */
  		if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream &&
+		    dc_is_stream_unchanged(new_stream, dm_old_crtc_state->stream) &&
+		    dc_is_stream_scaling_unchanged(new_stream, dm_old_crtc_state->stream) &&
  		    is_timing_unchanged_for_freesync(new_crtc_state,
  						     old_crtc_state)) {
  			new_crtc_state->mode_changed = false;