blob: 83c90c9174ffbf5a530fd0ab94df7f466b258d39 (
plain)
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
|
From ed7179e8fec06fe9a1d572dbd76f29459d2e1dad Mon Sep 17 00:00:00 2001
From: Eric Yang <Eric.Yang2@amd.com>
Date: Wed, 1 Nov 2017 15:43:47 -0400
Subject: [PATCH 2814/4131] drm/amd/display: fix MST link training fail
division by 0
When link training fail in MST case, we will divide by 0
when calculating avg_time_slots_per_mtp, so we cannot
proceed.
Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 ++++--
1 file changed, 4 insertions(+), 2 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 3b394a5..7b0e43c 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -2386,9 +2386,11 @@ void core_link_enable_stream(
/* Abort stream enable *unless* the failure was due to
* DP link training - some DP monitors will recover and
- * show the stream anyway.
+ * show the stream anyway. But MST displays can't proceed
+ * without link training.
*/
- if (status != DC_FAIL_DP_LINK_TRAINING) {
+ if (status != DC_FAIL_DP_LINK_TRAINING ||
+ pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) {
BREAK_TO_DEBUGGER();
return;
}
--
2.7.4
|