Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: DCN2X Prefer ODM over bottom pipe to find second pipe

[WHY]
When finding a second pipe for pipe split, currently will look for
bottom pipe in context first to decide the second pipe. This causes
issues in 2 plane to 1 plane transitions like fullscreen video where
bottom pipe no longer exists in the new configuration.

[HOW]
If previous context had an ODM pipe, use that to find the secondary pipe
first before looking at bottom pipe.

Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: sunglee <sunglee@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

sunglee and committed by
Alex Deucher
324b1fcb 0070a5b7

+4 -4
+4 -4
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
··· 2531 2531 * pick that pipe as secondary 2532 2532 * Same logic applies for ODM pipes 2533 2533 */ 2534 - if (dc->current_state->res_ctx.pipe_ctx[primary_pipe->pipe_idx].bottom_pipe) { 2535 - preferred_pipe_idx = dc->current_state->res_ctx.pipe_ctx[primary_pipe->pipe_idx].bottom_pipe->pipe_idx; 2534 + if (dc->current_state->res_ctx.pipe_ctx[primary_pipe->pipe_idx].next_odm_pipe) { 2535 + preferred_pipe_idx = dc->current_state->res_ctx.pipe_ctx[primary_pipe->pipe_idx].next_odm_pipe->pipe_idx; 2536 2536 if (res_ctx->pipe_ctx[preferred_pipe_idx].stream == NULL) { 2537 2537 secondary_pipe = &res_ctx->pipe_ctx[preferred_pipe_idx]; 2538 2538 secondary_pipe->pipe_idx = preferred_pipe_idx; 2539 2539 } 2540 2540 } 2541 2541 if (secondary_pipe == NULL && 2542 - dc->current_state->res_ctx.pipe_ctx[primary_pipe->pipe_idx].next_odm_pipe) { 2543 - preferred_pipe_idx = dc->current_state->res_ctx.pipe_ctx[primary_pipe->pipe_idx].next_odm_pipe->pipe_idx; 2542 + dc->current_state->res_ctx.pipe_ctx[primary_pipe->pipe_idx].bottom_pipe) { 2543 + preferred_pipe_idx = dc->current_state->res_ctx.pipe_ctx[primary_pipe->pipe_idx].bottom_pipe->pipe_idx; 2544 2544 if (res_ctx->pipe_ctx[preferred_pipe_idx].stream == NULL) { 2545 2545 secondary_pipe = &res_ctx->pipe_ctx[preferred_pipe_idx]; 2546 2546 secondary_pipe->pipe_idx = preferred_pipe_idx;