1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
From e0dc0c4ec53de6cfcad4425008e4b320039fd39e Mon Sep 17 00:00:00 2001
From: Jerry Zuo <Jerry.Zuo@amd.com>
Date: Thu, 17 Aug 2017 16:05:37 -0400
Subject: [PATCH 0987/4131] drm/amd/display: Fix two MST not light up
regressions
1. Change 100104: Move verify link cap after read edid causes MST
link_cap struct not being set. It leads to zero denominator
pbn_per_slot value, leading to the crash at
dal_fixed31_32_div(). Skip MST link training for now and will
need to add MST specific link traning routine later.
2. Change 98822: Adding edp supports changes link setting
condition from max_link to verified_link. It leads to MST is
getting wrong link settings.
e.g. LINK_SPREAD_05_DOWNSPREAD_30KHZ not set in MST case
Signed-off-by: Jerry Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 16 +++++++++-------
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++++++++
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index cab54af..ee9b984 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -607,6 +607,12 @@ bool dc_link_detect(struct dc_link *link, bool boot)
if (link->type == dc_connection_mst_branch) {
LINK_INFO("link=%d, mst branch is now Connected\n",
link->link_index);
+ /* Need to setup mst link_cap struct here
+ * otherwise dc_link_detect() will leave mst link_cap
+ * empty which leads to allocate_mst_payload() has "0"
+ * pbn_per_slot value leading to exception on dal_fixed31_32_div()
+ */
+ link->verified_link_cap = link->reported_link_cap;
return false;
}
@@ -672,13 +678,9 @@ bool dc_link_detect(struct dc_link *link, bool boot)
* TODO debug why Dell 2413 doesn't like
* two link trainings
*/
- if (is_mst_supported(link)) {
- link->verified_link_cap =
- link->reported_link_cap;
- } else {
- dp_hbr_verify_link_cap(link,
- &link->reported_link_cap);
- }
+
+ /* deal with non-mst cases */
+ dp_hbr_verify_link_cap(link, &link->reported_link_cap);
}
/* HDMI-DVI Dongle */
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 d621237..e35bdce 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
@@ -1459,6 +1459,14 @@ void decide_link_settings(struct dc_stream_state *stream,
return;
}
+ /* MST doesn't perform link training for now
+ * TODO: add MST specific link training routine
+ */
+ if (is_mst_supported(link)) {
+ *link_setting = link->verified_link_cap;
+ return;
+ }
+
/* search for the minimum link setting that:
* 1. is supported according to the link training result
* 2. could support the b/w requested by the timing
--
2.7.4
|