From: bugzilla-daemon@bugzilla.kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 208947] amdgpu DisplayPort won't recognize all display modes after 5.9 merges
Date: Thu, 20 Aug 2020 23:22:41 +0000 [thread overview]
Message-ID: <bug-208947-2300-u74BIZwvPL@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-208947-2300@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=208947
--- Comment #12 from Coleman Kane (ckane@colemankane.org) ---
Ok I re-did the bisect and I think I found the actual commit that introduced
the regression. I have confirmed this by generating a reverse-patch and then
applying that to the latest staging-testing branch I had cloned at the
beginning of the week, and I was able to use the newer kernel without the bug
occurring.
The bug appears to have been introduced by commit
3fd20292c2352660155bbc11736dd014b2fc6e98:
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 5cb7b834e459..1a3dbed3becb 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
@@ -1133,6 +1133,45 @@ static inline enum link_training_result
perform_link_training_int(
return status;
}
+static enum link_training_result check_link_loss_status(
+ struct dc_link *link,
+ const struct link_training_settings *link_training_setting)
+{
+ enum link_training_result status = LINK_TRAINING_SUCCESS;
+ unsigned int lane01_status_address = DP_LANE0_1_STATUS;
+ union lane_status lane_status;
+ uint8_t dpcd_buf[4] = {0};
+ uint32_t lane;
+
+ core_link_read_dpcd(
+ link,
+ lane01_status_address,
+ (uint8_t *)(dpcd_buf),
+ sizeof(dpcd_buf));
+
+ /*parse lane status*/
+ for (lane = 0; lane < link->cur_link_settings.lane_count; lane++) {
+ /*
+ * check lanes status
+ */
+ lane_status.raw = get_nibble_at_index(&dpcd_buf[0], lane);
+
+ if (!lane_status.bits.CHANNEL_EQ_DONE_0 ||
+ !lane_status.bits.CR_DONE_0 ||
+ !lane_status.bits.SYMBOL_LOCKED_0) {
+ /* if one of the channel equalization, clock
+ * recovery or symbol lock is dropped
+ * consider it as (link has been
+ * dropped) dp sink status has changed
+ */
+ status = LINK_TRAINING_LINK_LOSS;
+ break;
+ }
+ }
+
+ return status;
+}
+
static void initialize_training_settings(
struct dc_link *link,
const struct dc_link_settings *link_setting,
@@ -1372,6 +1411,9 @@ static void print_status_message(
case LINK_TRAINING_LQA_FAIL:
lt_result = "LQA failed";
break;
+ case LINK_TRAINING_LINK_LOSS:
+ lt_result = "Link loss";
+ break;
default:
break;
}
@@ -1531,6 +1573,14 @@ enum link_training_result
dc_link_dp_perform_link_training(
status);
}
+ /* delay 5ms after Main Link output idle pattern and then check
+ * DPCD 0202h.
+ */
+ if (link->connector_signal != SIGNAL_TYPE_EDP && status ==
LINK_TRAINING_SUCCESS) {
+ msleep(5);
+ status = check_link_loss_status(link, <_settings);
+ }
+
/* 6. print status message*/
print_status_message(link, <_settings, status);
diff --git a/drivers/gpu/drm/amd/display/include/link_service_types.h
b/drivers/gpu/drm/amd/display/include/link_service_types.h
index 4869d4562e4d..550f46e9b95f 100644
--- a/drivers/gpu/drm/amd/display/include/link_service_types.h
+++ b/drivers/gpu/drm/amd/display/include/link_service_types.h
@@ -66,6 +66,8 @@ enum link_training_result {
/* other failure during EQ step */
LINK_TRAINING_EQ_FAIL_EQ,
LINK_TRAINING_LQA_FAIL,
+ /* one of the CR,EQ or symbol lock is dropped */
+ LINK_TRAINING_LINK_LOSS,
};
struct link_training_settings {
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-08-20 23:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 21:02 [Bug 208947] New: amdgpu DisplayPort won't recognize all display modes after 5.9 merges bugzilla-daemon
2020-08-18 0:19 ` [Bug 208947] " bugzilla-daemon
2020-08-18 13:28 ` bugzilla-daemon
2020-08-18 18:22 ` bugzilla-daemon
2020-08-18 18:24 ` bugzilla-daemon
2020-08-18 18:27 ` bugzilla-daemon
2020-08-18 18:29 ` bugzilla-daemon
2020-08-18 18:30 ` bugzilla-daemon
2020-08-18 23:30 ` bugzilla-daemon
2020-08-19 22:22 ` bugzilla-daemon
2020-08-19 22:53 ` bugzilla-daemon
2020-08-20 3:20 ` bugzilla-daemon
2020-08-20 5:01 ` bugzilla-daemon
2020-08-20 23:22 ` bugzilla-daemon [this message]
2020-08-20 23:31 ` bugzilla-daemon
2020-08-21 2:18 ` bugzilla-daemon
2020-08-21 2:51 ` bugzilla-daemon
2020-08-21 19:52 ` bugzilla-daemon
2020-08-22 22:52 ` bugzilla-daemon
2021-01-02 3:22 ` bugzilla-daemon
2021-01-03 8:59 ` bugzilla-daemon
2021-01-03 9:05 ` bugzilla-daemon
2021-01-10 22:59 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-208947-2300-u74BIZwvPL@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox