drm/amd/display: Maintain current link settings in link loss interrupt
[Why] DP compliance test case 400.3.2.3 is failed because in link loss interrupt the current link settings is not used in the DP link training. [How] In link loss interrupt, use the current link settings in the following DP link training. Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Gary Li <garyli12@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e953cd08d7
commit
9fbfeaf110
@ -4576,6 +4576,7 @@ void dc_link_dp_handle_link_loss(struct dc_link *link)
|
||||
{
|
||||
int i;
|
||||
struct pipe_ctx *pipe_ctx;
|
||||
struct dc_link_settings prev_link_settings = link->preferred_link_setting;
|
||||
|
||||
for (i = 0; i < MAX_PIPES; i++) {
|
||||
pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];
|
||||
@ -4586,6 +4587,10 @@ void dc_link_dp_handle_link_loss(struct dc_link *link)
|
||||
if (pipe_ctx == NULL || pipe_ctx->stream == NULL)
|
||||
return;
|
||||
|
||||
/* toggle stream state with the preference for current link settings */
|
||||
dc_link_set_preferred_training_settings((struct dc *)link->dc,
|
||||
&link->cur_link_settings, NULL, link, true);
|
||||
|
||||
for (i = 0; i < MAX_PIPES; i++) {
|
||||
pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];
|
||||
if (pipe_ctx && pipe_ctx->stream && !pipe_ctx->stream->dpms_off &&
|
||||
@ -4601,6 +4606,10 @@ void dc_link_dp_handle_link_loss(struct dc_link *link)
|
||||
core_link_enable_stream(link->dc->current_state, pipe_ctx);
|
||||
}
|
||||
}
|
||||
|
||||
/* restore previous link settings preference */
|
||||
dc_link_set_preferred_training_settings((struct dc *)link->dc,
|
||||
&prev_link_settings, NULL, link, true);
|
||||
}
|
||||
|
||||
bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd_irq_dpcd_data, bool *out_link_loss,
|
||||
|
Loading…
Reference in New Issue
Block a user