Skip to content

Commit 718a556

Browse files
Xiaodong Yanalexdeucher
authored andcommitted
drm/amd/display: blank dp stream before re-train the link
[Why] When link loss happened, monitor can not light up if only re-train the link. [How] Blank all the DP streams on this link before re-train the link, and then unblank the stream Signed-off-by: Xiaodong Yan <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 933fe2c commit 718a556

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,6 +2908,12 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd
29082908
sizeof(hpd_irq_dpcd_data),
29092909
"Status: ");
29102910

2911+
for (i = 0; i < MAX_PIPES; i++) {
2912+
pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];
2913+
if (pipe_ctx && pipe_ctx->stream && pipe_ctx->stream->link == link)
2914+
link->dc->hwss.blank_stream(pipe_ctx);
2915+
}
2916+
29112917
for (i = 0; i < MAX_PIPES; i++) {
29122918
pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];
29132919
if (pipe_ctx && pipe_ctx->stream && pipe_ctx->stream->link == link)
@@ -2927,6 +2933,12 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd
29272933
if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
29282934
dc_link_reallocate_mst_payload(link);
29292935

2936+
for (i = 0; i < MAX_PIPES; i++) {
2937+
pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];
2938+
if (pipe_ctx && pipe_ctx->stream && pipe_ctx->stream->link == link)
2939+
link->dc->hwss.unblank_stream(pipe_ctx, &previous_link_settings);
2940+
}
2941+
29302942
status = false;
29312943
if (out_link_loss)
29322944
*out_link_loss = true;

0 commit comments

Comments
 (0)