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

drm/amd/display: Fix overlay with pre-blend color processing

[WHY]
Overlay works similarly to MPO, but uses global alpha on both planes and
sets the desktop as the rear plane instead of the front plane

[HOW]
Ensure that top plane isn't overlay by checking global alpha before
applying the previously added MPO fix

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@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>

authored by

Michael Strauss and committed by
Alex Deucher
507293b1 db65eb46

+5 -2
+5 -2
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
··· 2586 2586 2587 2587 while (top->top_pipe) 2588 2588 top = top->top_pipe; // Traverse to top pipe_ctx 2589 - if (top->plane_state && top->plane_state->layer_index == 0) 2590 - return true; // Front MPO plane not hidden 2589 + if (top->plane_state && top->plane_state->layer_index == 0 && !top->plane_state->global_alpha) 2590 + // Global alpha used by top plane for PIP overlay 2591 + // Pre-multiplied/per-pixel alpha used by MPO 2592 + // Check top plane's global alpha to ensure layer_index > 0 not caused by PIP 2593 + return true; // MPO in use and front plane not hidden 2591 2594 } 2592 2595 } 2593 2596 return false;