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

drm/amd/display: Check if PSR enabled when entering MALL

[Description]
- When attempting to enter MALL SS when a PSR panel
is connected, we have to check that the PSR panel
has already entered PSR because the vsync interrupt
call is per display index (can be called for the
non-PSR panel first)
- Also don't override link settings when programming
phantom stream (main and phantom pipe share the same link)

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Brian Chang <Brian.Chang@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alvin Lee and committed by
Alex Deucher
bf29274d 6d4727c8

+13 -3
+7 -2
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
··· 1561 1561 1562 1562 pipe_ctx->plane_res.scl_data.lb_params.alpha_en = pipe_ctx->bottom_pipe != NULL; 1563 1563 1564 - pipe_ctx->stream->link->psr_settings.psr_feature_enabled = false; 1565 - 1564 + /* Phantom and main stream share the same link (because the stream 1565 + * is constructed with the same sink). Make sure not to override 1566 + * and link programming on the main. 1567 + */ 1568 + if (pipe_ctx->stream->mall_stream_config.type != SUBVP_PHANTOM) { 1569 + pipe_ctx->stream->link->psr_settings.psr_feature_enabled = false; 1570 + } 1566 1571 return DC_OK; 1567 1572 } 1568 1573
+6 -1
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
··· 227 227 for (i = 0; i < dc->res_pool->pipe_count; i++) { 228 228 struct pipe_ctx *pipe = &dc->current_state->res_ctx.pipe_ctx[i]; 229 229 230 + /* If PSR is supported on an eDP panel that's connected, but that panel is 231 + * not in PSR at the time of trying to enter MALL SS, we have to include it 232 + * in the static screen CAB calculation 233 + */ 230 234 if (!pipe->stream || !pipe->plane_state || 231 - pipe->stream->link->psr_settings.psr_version != DC_PSR_VERSION_UNSUPPORTED || 235 + (pipe->stream->link->psr_settings.psr_version != DC_PSR_VERSION_UNSUPPORTED && 236 + pipe->stream->link->psr_settings.psr_allow_active) || 232 237 pipe->stream->mall_stream_config.type == SUBVP_PHANTOM) 233 238 continue; 234 239