From 1367306d8e2893080c3d3049daef153025e3edc9 Mon Sep 17 00:00:00 2001 From: jsg Date: Sun, 25 Feb 2024 23:59:06 +0000 Subject: [PATCH] drm/amd/display: Add align done check From Zhikai Zhai b9e373ed8d9cefd56bf2ff2dd2914105bf53bd4e in linux-6.6.y/6.6.18 94b38b895dec8c0ef093140a141e191b60ff614c in mainline linux --- .../pci/drm/amd/display/dc/link/protocols/link_dp_training.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training.c b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training.c index f575fafc7f8..cda3f72232c 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training.c +++ b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training.c @@ -517,6 +517,7 @@ enum link_training_result dp_check_link_loss_status( { enum link_training_result status = LINK_TRAINING_SUCCESS; union lane_status lane_status; + union lane_align_status_updated dpcd_lane_status_updated; uint8_t dpcd_buf[6] = {0}; uint32_t lane; @@ -532,10 +533,12 @@ enum link_training_result dp_check_link_loss_status( * check lanes status */ lane_status.raw = dp_get_nibble_at_index(&dpcd_buf[2], lane); + dpcd_lane_status_updated.raw = dpcd_buf[4]; if (!lane_status.bits.CHANNEL_EQ_DONE_0 || !lane_status.bits.CR_DONE_0 || - !lane_status.bits.SYMBOL_LOCKED_0) { + !lane_status.bits.SYMBOL_LOCKED_0 || + !dp_is_interlane_aligned(dpcd_lane_status_updated)) { /* if one of the channel equalization, clock * recovery or symbol lock is dropped * consider it as (link has been -- 2.20.1