From: Fangzhi Zuo <[email protected]>

[Why&How]
Restore the FRL verified cap from the reported cap so a link whose FRL
pre-training was skipped (e.g. skip_frl_pre_training) stays on FRL across
a hotplug instead of falling back to TMDS.

On hotplug the HDMI sink is recreated as SIGNAL_TYPE_HDMI_TYPE_A and
only the destructive verify path promotes it to FRL via
hdmi_frl_verify_link_cap(). When the non-destructive path runs - which is
what the skip_frl_pre_training quirk forces on an already-active link -
the HDMI branch mistakenly assigned the DP verified_link_cap from
reported_link_cap and left frl_verified_link_cap stale. With
frl_link_rate reading back as HDMI_FRL_LINK_RATE_DISABLE, the stream
collapsed to TMDS. Assign frl_verified_link_cap from
frl_reported_link_cap (populated during detection by
hdmi_frl_retrieve_link_cap()) to match the reference DM behavior and keep
the link on FRL.

Signed-off-by: Fangzhi Zuo <[email protected]>
Reviewed-by: Harry Wentland <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c 
b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index 22ad6a743038..1384197578ec 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -934,7 +934,7 @@ static void verify_link_capability_non_destructive(struct 
dc_link *link)
                else
                        link->verified_link_cap = dp_get_max_link_cap(link);
        } else if (dc_is_hdmi_signal(link->local_sink->sink_signal)) {
-               link->verified_link_cap = link->reported_link_cap;
+               link->frl_verified_link_cap = link->frl_reported_link_cap;
 
                if (is_hdmi_frl_in_use(link)) {
                        link->local_sink->sink_signal = SIGNAL_TYPE_HDMI_TYPE_A;
-- 
2.43.0

Reply via email to