From adc5dacf40de98165982e87b578402c1ef6e3ecd Mon Sep 17 00:00:00 2001 From: Mykola Lysenko Date: Thu, 3 Dec 2015 19:22:04 +0800 Subject: [PATCH 1137/1565] 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 Change-Id: Ia44ca51da66497055250c80e560799ff9ba4a307 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, -- 1.9.1