aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1313-drm-amdkfd-Fixed-a-kfifo-adaptation-issue.patch
blob: 83294bd9bf618b123f990d8086e63ec2d7e726d6 (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
From d745c16d4c9f2e45bf42b1d7014672527ec8fe78 Mon Sep 17 00:00:00 2001
From: ozeng <oak.zeng@amd.com>
Date: Thu, 3 Aug 2017 18:41:12 -0400
Subject: [PATCH 1313/4131] drm/amdkfd: Fixed a kfifo adaptation issue

On old linux version there are both kfifo and kfifo-new interfaces.
The adaptation to this was incorrect and caused different
interpretation of struct kfifo in different C source files,
which further caused a kfd interrupt handling issue.

This fixed the issue by adapting kfifo consistently in one
file (kfd_priv.h).

Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Yong Zhao <Yong.Zhao@amd.com>

Change-Id: I84d32a0a15118eafa158c01d728594987ae0cdd6
---
 drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 5 -----
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h      | 4 ++++
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c b/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c
index 258fdda..4f4392a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c
@@ -42,11 +42,6 @@
 
 #include <linux/slab.h>
 #include <linux/device.h>
-#if (defined OS_NAME_RHEL) && (OS_VERSION_MAJOR == 6)
-#include <linux/kfifo-new.h>
-#else
-#include <linux/kfifo.h>
-#endif
 #include "kfd_priv.h"
 
 #define KFD_IH_NUM_ENTRIES 8192
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index e73a651..5a86251 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -36,7 +36,11 @@
 #include <linux/interval_tree.h>
 #include <linux/seq_file.h>
 #include <linux/kref.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)
+#include <linux/kfifo-new.h>
+#else
 #include <linux/kfifo.h>
+#endif
 #include <kgd_kfd_interface.h>
 
 #include "amd_rdma.h"
-- 
2.7.4