From: Martin Tsai <martin.tsai@xxxxxxx> [Why] Some sprcified monitor scalar cannot recognize timing change on demand. Once the link phy disable and enable during a short period then the Sink protection mechanism could keep the screen in blank and cannot be recoverred. [How] To add 100ms delay between enable link phy and link training. Signed-off-by: Martin Tsai <martin.tsai@xxxxxxx> Reviewed-by: Aric Cyr <Aric.Cyr@xxxxxxx> Acked-by: Qingqing Zhuo <qingqing.zhuo@xxxxxxx> --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 08c3b32e188c..674f53aaf2b4 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -1559,9 +1559,10 @@ bool perform_link_training_with_retries( pipe_ctx->clock_source->id, link_setting); - if (stream->sink_patches.dppowerup_delay > 0) { - int delay_dp_power_up_in_ms = stream->sink_patches.dppowerup_delay; - + if ((link && link->dc->debug.dppowerup_delay > 0) || stream->sink_patches.dppowerup_delay > 0) { + int delay_dp_power_up_in_ms = + (link->dc->debug.dppowerup_delay >= stream->sink_patches.dppowerup_delay) ? + link->dc->debug.dppowerup_delay : stream->sink_patches.dppowerup_delay; msleep(delay_dp_power_up_in_ms); } diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 8cdbfa15874b..9138adf63f9f 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -498,6 +498,7 @@ struct dc_debug_options { bool usbc_combo_phy_reset_wa; bool disable_dsc; bool enable_dram_clock_change_one_display_vactive; + unsigned int dppowerup_delay; }; struct dc_debug_data { -- 2.17.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx