From 4617b27b7d395c4b7c885030e6b41623ddd5581f Mon Sep 17 00:00:00 2001 From: Mykola Lysenko Date: Thu, 3 Dec 2015 19:22:04 +0800 Subject: [PATCH 0572/1110] drm/amd/dal: temporary fix for MST chaing disconnect Unplug of MST chain happened (two displays), payload allocation table is empty on first reset mode, and cause 0 division in avg_time_slots_per_mtp calculation Signed-off-by: Harry Wentland Acked-by: Harry Wentland --- drivers/gpu/drm/amd/dal/dc/core/dc_link.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c index 44b3a2b..8dc3af2 100644 --- a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c @@ -1116,6 +1116,15 @@ static enum dc_status allocate_mst_payload(struct core_stream *stream) &table, true); + /* + * temporary fix. Unplug of MST chain happened (two displays), + * table is empty on first reset mode, and cause 0 division in + * avg_time_slots_per_mtp calculation + */ + + if (table.stream_count == 0) + return DC_OK; + /* program DP source TX for payload */ dc->hwss.update_mst_stream_allocation_table( link_encoder, -- 2.7.4