aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0098-drm-amd-display-Fixed-split-update-bug.patch
blob: df2a16229774f973d5f5c7acbc2686a52479ae9f (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
From 736d31f138bbadbc13a6397af5d220bcf978869d Mon Sep 17 00:00:00 2001
From: Yongqiang Sun <yongqiang.sun@amd.com>
Date: Thu, 22 Dec 2016 10:48:19 -0500
Subject: [PATCH 0098/4131] drm/amd/display: Fixed split update bug.

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, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index e6010ab..5e60640 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1333,6 +1333,7 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda
 	bool is_new_pipe_surface[MAX_PIPES];
 	const struct dc_surface *new_surfaces[MAX_SURFACES] = { 0 };
 	bool need_apply_clk_constraints = false;
+	bool can_skip_context_building = true;
 
 	update_surface_trace(dc, updates, surface_count);
 
@@ -1355,17 +1356,26 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda
 
 	for (i = 0 ; i < surface_count; i++) {
 		struct core_surface *surface = DC_SURFACE_TO_CORE(updates[i].surface);
+		bool existing_surface = false;
 
 		new_surfaces[i] = updates[i].surface;
+
 		for (j = 0; j < context->res_ctx.pool->pipe_count; j++) {
 			struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[j];
 
-			if (surface == pipe_ctx->surface)
+			if (surface == pipe_ctx->surface) {
+				existing_surface = true;
 				is_new_pipe_surface[j] = false;
+			}
 		}
+
+		if (updates[i].plane_info ||
+			updates[i].scaling_info ||
+			!existing_surface)
+			can_skip_context_building = false;
 	}
 
-	if (dc_target) {
+	if (!can_skip_context_building && dc_target) {
 		struct core_target *target = DC_TARGET_TO_CORE(dc_target);
 
 		if (core_dc->current_context->target_count == 0)
-- 
2.7.4