diff options
author | Eric Yang <Eric.Yang2@amd.com> | 2017-11-01 15:43:47 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-14 11:32:46 -0500 |
commit | 00f713c6dc657397ba37b42d7f6887f526c730c6 (patch) | |
tree | 492fc0db4fc5d7b417cb9e6a39580bce0ccbc33a | |
parent | 82e9781053c8a6aa3515aea3ade76546afb4c082 (diff) |
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>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 |
1 files 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 e70612eaf257..0602610489d7 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c | |||
@@ -2318,9 +2318,11 @@ void core_link_enable_stream( | |||
2318 | 2318 | ||
2319 | /* Abort stream enable *unless* the failure was due to | 2319 | /* Abort stream enable *unless* the failure was due to |
2320 | * DP link training - some DP monitors will recover and | 2320 | * DP link training - some DP monitors will recover and |
2321 | * show the stream anyway. | 2321 | * show the stream anyway. But MST displays can't proceed |
2322 | * without link training. | ||
2322 | */ | 2323 | */ |
2323 | if (status != DC_FAIL_DP_LINK_TRAINING) { | 2324 | if (status != DC_FAIL_DP_LINK_TRAINING || |
2325 | pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) { | ||
2324 | BREAK_TO_DEBUGGER(); | 2326 | BREAK_TO_DEBUGGER(); |
2325 | return; | 2327 | return; |
2326 | } | 2328 | } |