[PATCH 24/73] drm/amd/display: fix MST link training fail division by 0
Harry Wentland
harry.wentland at amd.com
Thu Nov 9 20:05:20 UTC 2017
From: Eric Yang <Eric.Yang2 at amd.com>
When link training fail in MST case, we will divide by 0
when calculating avg_time_slots_per_mtp, so we cannot
proceed.
Change-Id: Iae7aef320deb3c204f3450544c36f89b075a5c21
Signed-off-by: Eric Yang <Eric.Yang2 at amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland at 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 3b394a5f1c66..7b0e43c0685c 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.14.1
More information about the amd-gfx
mailing list