Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [High] drm/amd/display: amdgpu_dm_atomic_check() drops connector freesync_capable - [Medium] drm/amd/display: amdgpu_dm_atomic_check() drops CRTC mpo_requested flag - [Medium] drm/amd/display: amdgpu_dm_atomic_check() zeroes MST pbn and vcpi_slots - [Medium] drm/amd/display: amdgpu_dm_atomic_check() drops freesync_config and crc_skip --
commit bd2a6eec10d32cb9ed251de4423a0475cf93f1eb Author: Maxime Ripard <[email protected]> drm/amd/display: Take over the current stream and dc_state This commit copies dm_old_crtc_state->stream and dm_old_plane_state->dc_state (with their references) into newly created atomic states at the start of amdgpu_dm_atomic_check(). > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index 019022fba6f1e..91d0ce7830f01 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -6281,6 +6281,56 @@ STATIC_IFN_KUNIT int amdgpu_dm_atomic_check(struct > drm_device *dev, > > trace_amdgpu_dm_atomic_check_begin(state); > [ ... ] > + for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, > new_crtc_state, i) { > + dm_old_crtc_state = to_dm_crtc_state(old_crtc_state); > + dm_new_crtc_state = to_dm_crtc_state(new_crtc_state); > + > + if (!dm_new_crtc_state->stream && dm_old_crtc_state->stream) { > + dm_new_crtc_state->stream = dm_old_crtc_state->stream; > + dc_stream_retain(dm_new_crtc_state->stream); > + } > + } [Severity: Medium] Should this loop also preserve dm_old_crtc_state->mpo_requested? amdgpu_dm_crtc_create_state() leaves mpo_requested false. When a reset commit keeps an active overlay plane without a plane reset, dm_update_plane_state() returns early before setting mpo_requested, so the flag stays false on the swapped-in CRTC state and later commits. fill_dc_dirty_rects() then skips MPO bounding-box dirty rectangles and PSR-SU pause handling, causing display artifacts on PSR-SU and Panel Replay panels. [Severity: Medium] Does this also drop dm_crtc_state->freesync_config and crc_skip_count? On a non-modeset reset commit with FreeSync Video Mode active, amdgpu_dm_get_freesync_config_for_crtc() sees a zeroed freesync_config instead of VRR_STATE_ACTIVE_FIXED, disabling FreeSync Video Mode and making amdgpu_dm_handle_vrr_transition() drop the VRR vblank reference. Zeroing crc_skip_count also causes amdgpu_dm_crtc_handle_crc_irq() to drop the next two frames during active CRC capture. > + > + for_each_oldnew_plane_in_state(state, plane, old_plane_state, > new_plane_state, i) { > + struct dm_plane_state *dm_old_plane_state = > to_dm_plane_state(old_plane_state); > + struct dm_plane_state *dm_new_plane_state = > to_dm_plane_state(new_plane_state); > + > + if (!dm_new_plane_state->dc_state && > dm_old_plane_state->dc_state) { > + dm_new_plane_state->dc_state = > dm_old_plane_state->dc_state; > + dc_plane_state_retain(dm_new_plane_state->dc_state); > + } > + } [Severity: High] Does omitting a connector takeover loop clear dm_connector_state->freesync_capable? freesync_capable is sink capability metadata populated during EDID probing by amdgpu_dm_update_freesync_caps(), so amdgpu_dm_connector_atomic_create_state() leaves it false. On any reset commit, amdgpu_dm_get_freesync_config_for_crtc() then disables VRR. Once that state is swapped in, subsequent duplicated commits inherit freesync_capable as false, permanently disabling FreeSync and Panel Replay (in amdgpu_dm_link_supports_replay()) until the next hotplug or reprobe. [Severity: Medium] Can a non-modeset reset commit also zero dm_connector_state->pbn and vcpi_slots on active DP-MST connectors? amdgpu_dm_connector_atomic_create_state() zeroes both fields, and dm_encoder_helper_atomic_check() returns early without recomputing them when neither connectors_changed nor mode_changed is set. On a later suspend/resume, drm_atomic_helper_suspend() saves that zeroed state with state->duplicated set, so dm_encoder_helper_atomic_check() skips recalculating pbn and passes 0 to drm_dp_atomic_find_time_slots(), breaking DP-MST resume. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=5
