]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: ensure committing streams is seamless
authorClay King <clayking@amd.com>
Mon, 7 Jul 2025 17:21:30 +0000 (13:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Jul 2025 20:40:05 +0000 (16:40 -0400)
[Why]
When transitioning between topologies such as multi-display to single
display ODM 2:1, pipes might not be freed before use.

[How]
In dc_commit_streams, commit an additional, minimal transition if
original transition is not seamless to ensure pipes are freed.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Clay King <clayking@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 60a78c53addd8223d1de85d31c964fa755591a76..f760e930ea1b985db34889123a1e12e6ace8d5cc 100644 (file)
@@ -2399,6 +2399,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++) {