From: James Lin <[email protected]>

[why]
Before committing a non-seamless pipe-topology change,
dc_commit_streams() inserts a minimal (no-ODM) intermediate
transition so hardware can reach the target topology safely. A stream
that needs ODM combine to meet DISPCLK (e.g. 2560x1440@180 on
DCN4.0.1) cannot be validated under the minimal no-ODM pipe-split
policy, so commit_minimal_transition_state() cannot build that
intermediate state.

The call site then failed the whole commit and blanked the display,
even though the target context already passed full
MODE_AND_PROGRAMMING validation and is safe to program directly.
Because this runs in the atomic commit_tail after validation has
already succeeded, failing here leaves the display blank every time
the mode is set.

[how]
When the minimal transition cannot be built, log it and commit the
already-validated target context instead of failing the commit.

Cc: Sun peng Li <[email protected]>
Signed-off-by: James Lin <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 9d871a821c8d..464a5b7810d9 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2711,11 +2711,16 @@ enum dc_status dc_commit_streams(struct dc *dc, struct 
dc_commit_streams_params
         */
        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;
-               }
+               /*
+                * A minimal (no-ODM) intermediate transition could not be built
+                * for a stream that still passed full validation above, e.g. a
+                * high pixel clock mode that needs ODM combine to meet DISPCLK.
+                * In that case commit the validated target context directly
+                * instead of failing the whole commit and blanking the display.
+                */
+               if (!commit_minimal_transition_state(dc, context))
+                       DC_LOG_WARNING("%s: minimal transition unavailable; 
committing target\n",
+                                      __func__);
        }
 
        res = dc_commit_state_no_check(dc, context);
-- 
2.43.0

Reply via email to