[PATCH 19/38] drm/amd/display: fix bug with check for HPD Low in verify link cap
Bhawanpreet Lakha
Bhawanpreet.Lakha at amd.com
Wed Oct 2 18:16:14 UTC 2019
From: Sivapiriyan Kumarasamy <sivapiriyan.kumarasamy at amd.com>
[Why]
There is a bug when determining if link training should be retried when
HPD is low in dp_verify_link_cap_with_retries.
[How]
Correctly, fail dp_verify_link_cap_with_retries without retry when
HPD is low.
Change-Id: I6fbf64c28f0aac96252a508715a806927fb86d63
Signed-off-by: Sivapiriyan Kumarasamy <sivapiriyan.kumarasamy at amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu at amd.com>
Acked-by: Abdoulaye Berthe <Abdoulaye.Berthe at amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 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 701b73926616..5a0c3384c16b 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
@@ -1656,11 +1656,14 @@ bool dp_verify_link_cap_with_retries(
for (i = 0; i < attempts; i++) {
int fail_count = 0;
- enum dc_connection_type type;
+ enum dc_connection_type type = dc_connection_none;
memset(&link->verified_link_cap, 0,
sizeof(struct dc_link_settings));
- if (!dc_link_detect_sink(link, &type)) {
+ if (!dc_link_detect_sink(link, &type) || type == dc_connection_none) {
+ link->verified_link_cap.lane_count = LANE_COUNT_ONE;
+ link->verified_link_cap.link_rate = LINK_RATE_LOW;
+ link->verified_link_cap.link_spread = LINK_SPREAD_DISABLED;
break;
} else if (dp_verify_link_cap(link,
&link->reported_link_cap,
--
2.17.1
More information about the amd-gfx
mailing list