aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0297-drm-amd-display-DP-is-hotplugged-HDMI-with-4-2-0-cor.patch
blob: f5671c310efb7d0a8a68f02e4cb034d012a47f60 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From 6b6bf476eb1049d1bb84c384311400006fc5f9a6 Mon Sep 17 00:00:00 2001
From: Charlene Liu <charlene.liu@amd.com>
Date: Fri, 17 Mar 2017 13:09:09 -0400
Subject: [PATCH 0297/4131] drm/amd/display: DP is hotplugged, HDMI with 4:2:0
 corruption

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 9f624e8..875d1a6 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -297,8 +297,8 @@ bool resource_are_streams_timing_synchronizable(
 		return false;
 
 	if (stream1->phy_pix_clk != stream2->phy_pix_clk
-			&& !dc_is_dp_signal(stream1->signal)
-			&& !dc_is_dp_signal(stream2->signal))
+			&& (!dc_is_dp_signal(stream1->signal)
+			|| !dc_is_dp_signal(stream2->signal)))
 		return false;
 
 	return true;
@@ -1063,6 +1063,8 @@ static bool are_stream_backends_same(
 	if (stream_a == NULL || stream_b == NULL)
 		return false;
 
+	if (stream_a->public.timing.pixel_encoding != stream_b->public.timing.pixel_encoding)
+		return false;
 	if (is_timing_changed(stream_a, stream_b))
 		return false;
 
@@ -1072,8 +1074,8 @@ static bool are_stream_backends_same(
 bool is_stream_unchanged(
 	const struct core_stream *old_stream, const struct core_stream *stream)
 {
-	if (old_stream == stream)
-		return true;
+	if (old_stream != stream)
+		return false;
 
 	if (!are_stream_backends_same(old_stream, stream))
 		return false;
@@ -1357,6 +1359,7 @@ enum dc_status resource_map_pool_resources(
 			continue;
 		}
 	}
+
 		/* mark resources used for stream that is already active */
 		for (j = 0; j < MAX_PIPES; j++) {
 			struct pipe_ctx *pipe_ctx =
-- 
2.7.4