Currently, the intel_dp->frl.is_trained is cleared only when the HDMI link
status IRQ reports the link down. A sink disconnect, or a PCON that resets
itself and drops the HPD, doesn't clear it. As a result, the FRL training
is skipped at the next enable although the HDMI link is gone.

Clear the flag on a long HPD. The next enable then reads the state of
the PCON, and trains the link if it is not already in FRL mode.

Signed-off-by: Ankit Nautiyal <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 0c7c57d9f3ab..179e0d8b89c2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -7140,6 +7140,13 @@ intel_dp_hpd_pulse(struct intel_digital_port *dig_port, 
bool long_hpd)
                intel_dp->reset_link_params = true;
                intel_dp_invalidate_source_oui(intel_dp);
 
+               /*
+                * The HDMI link of a PCON is lost with the sink, forget its
+                * trained state, so that the FRL training is checked again at
+                * the next enable.
+                */
+               intel_dp->frl.is_trained = false;
+
                return IRQ_NONE;
        }
 
-- 
2.50.1

Reply via email to