aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1605-Hybrid-kfd-adaption-Disable-cross_memory_copy-featur.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1605-Hybrid-kfd-adaption-Disable-cross_memory_copy-featur.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/1605-Hybrid-kfd-adaption-Disable-cross_memory_copy-featur.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1605-Hybrid-kfd-adaption-Disable-cross_memory_copy-featur.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1605-Hybrid-kfd-adaption-Disable-cross_memory_copy-featur.patch
new file mode 100644
index 00000000..f1ae8414
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1605-Hybrid-kfd-adaption-Disable-cross_memory_copy-featur.patch
@@ -0,0 +1,45 @@
+From 5a0afb2493ee7dd2a36c2f577542b6564c728d70 Mon Sep 17 00:00:00 2001
+From: Yong Zhao <Yong.Zhao@amd.com>
+Date: Fri, 3 Mar 2017 14:50:59 -0500
+Subject: [PATCH 1605/4131] Hybrid-kfd-adaption: Disable cross_memory_copy
+ feature
+
+The feature relies on mm_access() to be exported by kernel code, but
+all the current upstream kernels have not make it exported. We have
+to disable the feautre for hybrid driver compatibility.
+
+Change-Id: I8a316414114252d8250c47b73f047e43db46eef2
+Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+index 52d120c..bad4783 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+@@ -1876,6 +1876,13 @@ static int kfd_ioctl_get_tile_config(struct file *filep,
+ return 0;
+ }
+
++#if defined(BUILD_AS_DKMS)
++static int kfd_ioctl_cross_memory_copy(struct file *filep,
++ struct kfd_process *local_p, void *data)
++{
++ return 0;
++}
++#else
+ static int kfd_ioctl_cross_memory_copy(struct file *filep,
+ struct kfd_process *local_p, void *data)
+ {
+@@ -2116,6 +2123,7 @@ static int kfd_ioctl_cross_memory_copy(struct file *filep,
+ args->bytes_copied = total_copied;
+ return err;
+ }
++#endif
+
+ #define AMDKFD_IOCTL_DEF(ioctl, _func, _flags) \
+ [_IOC_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags, .cmd_drv = 0, .name = #ioctl}
+--
+2.7.4
+