aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0712-drm-amd-display-Remove-struct-from-stack-in-dp_set_t.patch
blob: c675210a85fc416746a9404484862732757fd91a (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From c02e8ee3eafcb0154d0b42c0ed060f02de0fd30f Mon Sep 17 00:00:00 2001
From: Harry Wentland <harry.wentland@amd.com>
Date: Sun, 30 Jul 2017 13:19:56 -0400
Subject: [PATCH 0712/4131] drm/amd/display: Remove struct from stack in
 dp_set_test_pattern

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 50724f9..231cade 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -2407,7 +2407,7 @@ bool dc_link_dp_set_test_pattern(
 	unsigned int cust_pattern_size)
 {
 	struct pipe_ctx *pipes = link->dc->current_context->res_ctx.pipe_ctx;
-	struct pipe_ctx pipe_ctx = pipes[0];
+	struct pipe_ctx *pipe_ctx = &pipes[0];
 	unsigned int lane;
 	unsigned int i;
 	unsigned char link_qual_pattern[LANE_COUNT_DP_MAX] = {0};
@@ -2418,7 +2418,7 @@ bool dc_link_dp_set_test_pattern(
 
 	for (i = 0; i < MAX_PIPES; i++) {
 		if (pipes[i].stream->sink->link == link) {
-			pipe_ctx = pipes[i];
+			pipe_ctx = &pipes[i];
 			break;
 		}
 	}
@@ -2430,14 +2430,14 @@ bool dc_link_dp_set_test_pattern(
 	if (link->test_pattern_enabled && test_pattern ==
 			DP_TEST_PATTERN_VIDEO_MODE) {
 		/* Set CRTC Test Pattern */
-		set_crtc_test_pattern(link, &pipe_ctx, test_pattern);
+		set_crtc_test_pattern(link, pipe_ctx, test_pattern);
 		dp_set_hw_test_pattern(link, test_pattern,
 				(uint8_t *)p_custom_pattern,
 				(uint32_t)cust_pattern_size);
 
 		/* Unblank Stream */
 		link->dc->hwss.unblank_stream(
-			&pipe_ctx,
+			pipe_ctx,
 			&link->verified_link_cap);
 		/* TODO:m_pHwss->MuteAudioEndpoint
 		 * (pPathMode->pDisplayPath, false);
@@ -2464,7 +2464,7 @@ bool dc_link_dp_set_test_pattern(
 			 * MuteAudioEndpoint(pPathMode->pDisplayPath, true);
 			 */
 			/* Blank stream */
-			pipes->stream_enc->funcs->dp_blank(pipe_ctx.stream_enc);
+			pipes->stream_enc->funcs->dp_blank(pipe_ctx->stream_enc);
 		}
 
 		dp_set_hw_test_pattern(link, test_pattern,
@@ -2545,7 +2545,7 @@ bool dc_link_dp_set_test_pattern(
 		}
 	} else {
 	/* CRTC Patterns */
-		set_crtc_test_pattern(link, &pipe_ctx, test_pattern);
+		set_crtc_test_pattern(link, pipe_ctx, test_pattern);
 		/* Set Test Pattern state */
 		link->test_pattern_enabled = true;
 	}
-- 
2.7.4