From: Charlene Liu <[email protected]>

[Why]
Link-loss retrain turns the link off and back on. Powering the eDP
panel off here drops LCDVDD and the panel must wait before the
picture can return.

[How]
dp_handle_hpd_rx_irq() sets skip_implict_edp_power_control around
dp_handle_link_loss() and restores the old value. The flag also skips
backlight-off and the DPCD sink power-down. The path runs for non-eDP
link loss, and for eDP only when replay ESD recovery is needed.

Cc: Leo Chen <[email protected]>
Signed-off-by: Charlene Liu <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
---
 .../amd/display/dc/link/protocols/link_dp_irq_handler.c   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c 
b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
index da679fb7d89c..59f9150edf30 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
@@ -576,8 +576,14 @@ bool dp_handle_hpd_rx_irq(struct dc_link *link,
 
                        if (defer_handling && has_left_work)
                                *has_left_work = true;
-                       else
+                       else {
+                               bool skip_implict_edp_power_control = 
link->skip_implict_edp_power_control;
+
+                               /*skip LCDVDD power off for retraining*/
+                               link->skip_implict_edp_power_control = true;
                                dp_handle_link_loss(link);
+                               link->skip_implict_edp_power_control = 
skip_implict_edp_power_control;
+                       }
 
                        status = false;
                        if (out_link_loss)
-- 
2.43.0

Reply via email to