aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0833-drm-amdgpu-dal-dm-fix-compilation-when-CIK-support-i.patch
blob: 244977a4b01d86b30a3f0a43a3a590014739d350 (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 5a9b8f9b9274bfda316cdca31306dc5a27a5215d Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Thu, 25 Feb 2016 16:24:46 -0500
Subject: [PATCH 0833/1110] drm/amdgpu/dal/dm: fix compilation when CIK support
 is disabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Protect the dce8 stuff shared with non-DAL with the CIK config
flag.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
index 67dd7b9..7f6325c 100644
--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
@@ -36,7 +36,9 @@
 #include "amdgpu_dm_irq.h"
 #include "dm_helpers.h"
 
+#ifdef CONFIG_DRM_AMDGPU_CIK
 #include "dce_v8_0.h"
+#endif
 #include "dce_v10_0.h"
 #include "dce_v11_0.h"
 
@@ -1158,6 +1160,7 @@ static void dm_page_flip(struct amdgpu_device *adev,
 			&addr, 1);
 }
 
+#ifdef CONFIG_DRM_AMDGPU_CIK
 static const struct amdgpu_display_funcs dm_dce_v8_0_display_funcs = {
 	.set_vga_render_state = dce_v8_0_set_vga_render_state,
 	.bandwidth_update = dm_bandwidth_update, /* called unconditionally */
@@ -1179,6 +1182,7 @@ static const struct amdgpu_display_funcs dm_dce_v8_0_display_funcs = {
 	.stop_mc_access = dce_v8_0_stop_mc_access, /* called unconditionally */
 	.resume_mc_access = dce_v8_0_resume_mc_access, /* called unconditionally */
 };
+#endif
 
 static const struct amdgpu_display_funcs dm_dce_v10_0_display_funcs = {
 	.set_vga_render_state = dce_v10_0_set_vga_render_state,
@@ -1236,8 +1240,10 @@ static int dm_early_init(void *handle)
 		adev->mode_info.num_crtc = 6;
 		adev->mode_info.num_hpd = 6;
 		adev->mode_info.num_dig = 6;
+#ifdef CONFIG_DRM_AMDGPU_CIK
 		if (adev->mode_info.funcs == NULL)
 			adev->mode_info.funcs = &dm_dce_v8_0_display_funcs;
+#endif
 		break;
 	case CHIP_FIJI:
 	case CHIP_TONGA:
-- 
2.7.4