aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1313-drm-amdkfd-Fixed-a-kfifo-adaptation-issue.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1313-drm-amdkfd-Fixed-a-kfifo-adaptation-issue.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1313-drm-amdkfd-Fixed-a-kfifo-adaptation-issue.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1313-drm-amdkfd-Fixed-a-kfifo-adaptation-issue.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1313-drm-amdkfd-Fixed-a-kfifo-adaptation-issue.patch
new file mode 100644
index 00000000..83294bd9
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1313-drm-amdkfd-Fixed-a-kfifo-adaptation-issue.patch
@@ -0,0 +1,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
+