From: sashiko-bot@kernel.org
To: "Maxime Ripard" <mripard@kernel.org>
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v13 5/9] drm/amd/display: Take over the current stream and dc_state
Date: Thu, 03 Dec 2026 15:40:25 +0000 [thread overview]
Message-ID: <sashiko-outbox-248134@kernel.org> (raw)
In-Reply-To: <20261203-drm-reset-state-flag-v13-5-b09f19f64e64@kernel.org>
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 <mripard@kernel.org>
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/20261203-drm-reset-state-flag-v13-0-b09f19f64e64@kernel.org?part=5
next prev parent reply other threads:[~2026-12-03 15:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 14:07 [PATCH v13 0/9] drm: Add DRM_MODE_ATOMIC_RESET flag Maxime Ripard
2026-12-03 14:07 ` [PATCH v13 1/9] drm/lease: Add a helper to tell whether a lease was revoked Maxime Ripard
2026-12-03 14:23 ` sashiko-bot
2026-12-03 14:07 ` [PATCH v13 2/9] drm/atomic: Add drm_atomic_implements_create_state() helper Maxime Ripard
2026-12-03 14:07 ` [PATCH v13 3/9] drm/atomic: Allow filling a commit with pristine object states Maxime Ripard
2026-12-03 15:02 ` sashiko-bot
2026-12-03 14:07 ` [PATCH v13 4/9] drm/tests: atomic: Add tests for drm_atomic_commit_fill_with_defaults() Maxime Ripard
2026-12-03 15:21 ` sashiko-bot
2026-12-03 14:07 ` [PATCH v13 5/9] drm/amd/display: Take over the current stream and dc_state Maxime Ripard
2026-12-03 15:40 ` sashiko-bot [this message]
2026-12-03 14:07 ` [PATCH v13 6/9] drm/vc4: Carry the HVS channel over to created CRTC states Maxime Ripard
2026-12-03 16:06 ` sashiko-bot
2026-12-03 14:07 ` [PATCH v13 7/9] drm/msm/dpu1: Carry the mixers " Maxime Ripard
2026-12-03 16:36 ` sashiko-bot
2026-12-03 14:07 ` [PATCH v13 8/9] drm/atomic-uapi: Add DRM_MODE_ATOMIC_RESET flag Maxime Ripard
2026-12-03 14:07 ` [PATCH v13 9/9] drm/vkms: Add driver-specific plane property for testing Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-248134@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=mripard@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.