aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1137-drm-amd-dal-temporary-fix-for-MST-chaing-disconnect.patch
blob: d3846e66c9c1460791db820356e6880680cc4629 (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
39
40
From adc5dacf40de98165982e87b578402c1ef6e3ecd Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
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 <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 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