aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0096-drm-amd-display-Fixed-crash.patch
blob: 3872088e2a234824d6694f29a99dd517aa9047fe (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
From 6996b58ca5836674b54d205b663e7ba40491a14f Mon Sep 17 00:00:00 2001
From: Yongqiang Sun <yongqiang.sun@amd.com>
Date: Wed, 21 Dec 2016 16:48:51 -0500
Subject: [PATCH 0096/4131] drm/amd/display: Fixed crash

Signed-off-by: Yongqiang Sun <yongqiang.sun@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.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 891075e..e6010ab 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -167,24 +167,20 @@ static bool stream_adjust_vmin_vmax(struct dc *dc,
 	struct core_stream *core_stream = DC_STREAM_TO_CORE(stream[0]);
 	int i = 0;
 	bool ret = false;
-	struct pipe_ctx *pipes;
-	unsigned int underlay_idx = core_dc->res_pool->underlay_pipe_index;
 
 	for (i = 0; i < MAX_PIPES; i++) {
-		if (core_dc->current_context->res_ctx.pipe_ctx[i].stream == core_stream
-				&& i != underlay_idx) {
+		struct pipe_ctx *pipe = &core_dc->current_context->res_ctx.pipe_ctx[i];
 
-			pipes = &core_dc->current_context->res_ctx.pipe_ctx[i];
-			core_dc->hwss.set_drr(&pipes, 1, vmin, vmax);
+		if (pipe->stream == core_stream && pipe->stream_enc) {
+			core_dc->hwss.set_drr(&pipe, 1, vmin, vmax);
 
 			/* build and update the info frame */
-			resource_build_info_frame(pipes);
-			core_dc->hwss.update_info_frame(pipes);
+			resource_build_info_frame(pipe);
+			core_dc->hwss.update_info_frame(pipe);
 
 			ret = true;
 		}
 	}
-
 	return ret;
 }
 
-- 
2.7.4