perform the same seamlessness guard and minimal transition: - Seamless check and minimal transition in update path: drivers/gpu/drm/amd/display/dc/core/dc.c:4957-4961 - The seamlessness predicate hook was introduced earlier and implemented for DCN32: - Hook declaration: drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h:410+ - Implementation example: drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c (function dcn32_is_pipe_topology_transition_seamless) Stability and regression risk - Change is confined to the AMD DC commit path and only triggers when the hwss hook reports a non‑seamless transition. - Uses an existing, widely used helper (commit_minimal_transition_state) that already has many refinements: - E.g., skipping forced ODM during minimal transition to keep it seamless (b04c21abe21ff), and generic non‑seamless detection and handling (d2dea1f140385, related v3 sequence work). - No architectural changes; behavior mirrors already‑trusted logic in plane/stream update. - Potential minor performance impact (an extra, minimal intermediate commit) only when necessary; functional correctness/glitch avoidance outweighs this. Prerequisites and backport considerations - Requires the hwss.is_pipe_topology_transition_seamless hook and its implementation (added by “drm/amd/display: add seamless pipe topology transition check”). Stable trees lacking this will need that prerequisite backported first. - In some branches dc_validate_with_context signature differs: - In this tree it takes a `bool fast_validate` (drivers/gpu/drm/amd/display/dc/dc.h:1570-1574). - The patch snippet shows a newer enum mode (DC_VALIDATE_MODE_AND_PROGRAMMING). When backporting, keep using the existing boolean call pattern. - commit_minimal_transition_state return type varies by branch (bool vs enum in the snippet). In this tree it returns bool (drivers/gpu/drm/amd/display/dc/core/dc.c:4551). Adapt the return check accordingly during backport. Conclusion - This is a targeted bug fix that prevents visible glitches and underflow by ensuring a seamless intermediate transition in dc_commit_streams. It aligns commit behavior with other DC update paths and is guarded by a capability hook. With prerequisites present, it is a strong candidate for stable backport. drivers/gpu/drm/amd/display/dc/core/dc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index bb189f6773397..bc364792d9d31 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -2413,6 +2413,18 @@ enum dc_status dc_commit_streams(struct dc *dc, struct dc_commit_streams_params goto fail; } + /* + * If not already seamless, make transition seamless by inserting intermediate minimal transition + */ + if (dc->hwss.is_pipe_topology_transition_seamless && + !dc->hwss.is_pipe_topology_transition_seamless(dc, dc->current_state, context)) { + res = commit_minimal_transition_state(dc, context); + if (res != DC_OK) { + BREAK_TO_DEBUGGER(); + goto fail; + } + } + res = dc_commit_state_no_check(dc, context); for (i = 0; i < params->stream_count; i++) { -- 2.51.0[PATCH AUTOSEL 6.17-6.6] drm/amd/display: ensure committing streams is seamlessSasha Levin undefinedpatches@lists.linux.dev, stable@vger.kernel.org undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefinedD'