aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0101-drm-amd-display-Pass-adev-to-fill_plane_attr.patch
blob: 4ad0b11ee47801eceec75b8d824191aa321a85f9 (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
From 94e7881ecc3c7c21df983fb608d36cce7ff86703 Mon Sep 17 00:00:00 2001
From: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Date: Thu, 15 Dec 2016 00:53:04 -0500
Subject: [PATCH 0101/4131] drm/amd/display: Pass adev to fill_plane_attr

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
index e7ada89..66c72ca 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
@@ -412,6 +412,7 @@ static bool get_fb_info(
 	return true;
 }
 static void fill_plane_attributes_from_fb(
+	struct amdgpu_device *adev,
 	struct dc_surface *surface,
 	const struct amdgpu_framebuffer *amdgpu_fb, bool addReq)
 {
@@ -456,6 +457,7 @@ static void fill_plane_attributes_from_fb(
 
 	memset(&surface->tiling_info, 0, sizeof(surface->tiling_info));
 
+	/* Fill GFX8 params */
 	if (AMDGPU_TILING_GET(tiling_flags, ARRAY_MODE) == DC_ARRAY_2D_TILED_THIN1)
 	{
 		unsigned bankw, bankh, mtaspect, tile_split, num_banks;
@@ -546,6 +548,7 @@ static void fill_gamma_from_crtc(
 }
 
 static void fill_plane_attributes(
+			struct amdgpu_device *adev,
 			struct dc_surface *surface,
 			struct drm_plane_state *state, bool addrReq)
 {
@@ -555,6 +558,7 @@ static void fill_plane_attributes(
 
 	fill_rects_from_plane_state(state, surface);
 	fill_plane_attributes_from_fb(
+		crtc->dev->dev_private,
 		surface,
 		amdgpu_fb,
 		addrReq);
@@ -669,7 +673,11 @@ static void dm_dc_surface_commit(
 	}
 
 	/* Surface programming */
-	fill_plane_attributes(dc_surface, crtc->primary->state, true);
+	fill_plane_attributes(
+			crtc->dev->dev_private,
+			dc_surface,
+			crtc->primary->state,
+			true);
 	if (crtc->mode.private_flags &
 		AMDGPU_CRTC_MODE_PRIVATE_FLAGS_GAMMASET) {
 		/* reset trigger of gamma */
@@ -3168,6 +3176,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
 
 				surface = dc_create_surface(dc);
 				fill_plane_attributes(
+					crtc->dev->dev_private,
 					surface,
 					plane_state,
 					false);
-- 
2.7.4