aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0675-drm-amd-dal-fix-in-stream-encoder-allocation.patch
blob: 610aca0a9fd0fe4c61403f7aad32152f856c715d (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
41
42
43
44
45
From dd54dd6d5d123f4e3fa6abda61a96a740342b7bb Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
Date: Thu, 7 Jan 2016 18:39:43 +0800
Subject: [PATCH 0675/1110] drm/amd/dal: fix in stream encoder allocation

In case preferred stream for non-MST link already
acquired, pick-up left free stream encoder

Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/dce_base/dce_base_resource.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/dce_base/dce_base_resource.c b/drivers/gpu/drm/amd/dal/dc/dce_base/dce_base_resource.c
index 3633402..1b091be 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce_base/dce_base_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce_base/dce_base_resource.c
@@ -106,10 +106,19 @@ static struct stream_encoder *find_first_free_match_stream_enc_for_link(
 		}
 	}
 
-	/* TODO: Handle MST properly
-	 * Currently pick next available stream encoder if found*/
-	if (j >= 0 && link->public.sink[0]->sink_signal ==
-			SIGNAL_TYPE_DISPLAY_PORT_MST)
+	/*
+	 * below can happen in cases when stream encoder is acquired:
+	 * 1) for second MST display in chain, so preferred engine already
+	 * acquired;
+	 * 2) for another link, which preferred engine already acquired by any
+	 * MST configuration.
+	 *
+	 * If signal is of DP type and preferred engine not found, return last available
+	 *
+	 * TODO - This is just a patch up and a generic solution is
+	 * required for non DP connectors.
+	 */
+	if (j >= 0 &&  dc_is_dp_signal(link->public.sink[0]->sink_signal))
 		return res_ctx->pool.stream_enc[j];
 
 	return NULL;
-- 
2.7.4