aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0823-drm-amd-dal-Correctly-attach-surfaces-to-context-at-.patch
blob: c597c44735370a556d443627af9f6b43c8e08e00 (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
From 13d8cf5d9a728218d5e96222eb87c1498f4039af Mon Sep 17 00:00:00 2001
From: Harry Wentland <harry.wentland@amd.com>
Date: Fri, 19 Feb 2016 17:13:14 -0500
Subject: [PATCH 0823/1110] drm/amd/dal: Correctly attach surfaces to context
 at validate

DCE8, and 10 were missed previously.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c | 8 +++++++-
 drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c   | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c
index f241318..d2ea0a0 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c
@@ -891,10 +891,16 @@ enum dc_status dce100_validate_with_context(
 						== context->targets[i]) {
 				unchanged = true;
 				set_target_unchanged(context, i);
+				attach_surfaces_to_context(
+					(struct dc_surface **)dc->current_context.
+						target_status[j].surfaces,
+					dc->current_context.target_status[j].surface_count,
+					&context->targets[i]->public,
+					context);
 				context->target_status[i] =
 					dc->current_context.target_status[j];
 			}
-		if (!unchanged)
+		if (!unchanged || set[i].surface_count != 0)
 			if (!attach_surfaces_to_context(
 					(struct dc_surface **)set[i].surfaces,
 					set[i].surface_count,
diff --git a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c
index ed143f4..c645d25 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c
@@ -1006,10 +1006,16 @@ enum dc_status dce80_validate_with_context(
 						== context->targets[i]) {
 				unchanged = true;
 				set_target_unchanged(context, i);
+				attach_surfaces_to_context(
+					(struct dc_surface **)dc->current_context.
+						target_status[j].surfaces,
+					dc->current_context.target_status[j].surface_count,
+					&context->targets[i]->public,
+					context);
 				context->target_status[i] =
 					dc->current_context.target_status[j];
 			}
-		if (!unchanged)
+		if (!unchanged || set[i].surface_count != 0)
 			if (!attach_surfaces_to_context(
 					(struct dc_surface **)set[i].surfaces,
 					set[i].surface_count,
-- 
2.7.4