summarylogtreecommitdiffstats
path: root/0002-linux-4.9-fixes.patch
blob: f29abe6f7c8718e426be1b8ca4a80031d379e182 (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 0ead7017e1db18be971c24c891d4bdcc507deea7 Mon Sep 17 00:00:00 2001
From: David McFarland <corngood@gmail.com>
Date: Sun, 29 Jan 2017 18:23:47 -0400
Subject: [PATCH 2/5] linux-4.9 fixes

---
 amd/amdkcl/kcl_io.c                     | 2 ++
 amd/display/amdgpu_dm/amdgpu_dm_types.c | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/amd/amdkcl/kcl_io.c b/amd/amdkcl/kcl_io.c
index d8f843f..9a1bd9b 100644
--- a/amd/amdkcl/kcl_io.c
+++ b/amd/amdkcl/kcl_io.c
@@ -31,4 +31,6 @@ void amdkcl_io_init(void)
 	_kcl_io_free_memtype = amdkcl_fp_setup("io_free_memtype", NULL);
 }
 #endif
+#else
+void amdkcl_io_init(void) {}
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) */
diff --git a/amd/display/amdgpu_dm/amdgpu_dm_types.c b/amd/display/amdgpu_dm/amdgpu_dm_types.c
index 34313a9..44a4a71 100644
--- a/amd/display/amdgpu_dm/amdgpu_dm_types.c
+++ b/amd/display/amdgpu_dm/amdgpu_dm_types.c
@@ -1720,6 +1720,10 @@ static int dm_plane_helper_prepare_fb(
 static int dm_plane_helper_prepare_fb(
 	struct drm_plane *plane,
 	const struct drm_plane_state *new_state)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+static int dm_plane_helper_prepare_fb(
+	struct drm_plane *plane,
+	struct drm_plane_state *new_state)
 #else
 static int dm_plane_helper_prepare_fb(
 	struct drm_plane *plane,
@@ -1766,6 +1770,10 @@ static void dm_plane_helper_cleanup_fb(
 static void dm_plane_helper_cleanup_fb(
 	struct drm_plane *plane,
 	const struct drm_plane_state *old_state)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+static void dm_plane_helper_cleanup_fb(
+	struct drm_plane *plane,
+	struct drm_plane_state *old_state)
 #else
 static void dm_plane_helper_cleanup_fb(
 	struct drm_plane *plane,
-- 
2.12.2