aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2794-drm-amdkfd-Update-kfd_ioctl.h-for-GWS-allocation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2794-drm-amdkfd-Update-kfd_ioctl.h-for-GWS-allocation.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2794-drm-amdkfd-Update-kfd_ioctl.h-for-GWS-allocation.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2794-drm-amdkfd-Update-kfd_ioctl.h-for-GWS-allocation.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2794-drm-amdkfd-Update-kfd_ioctl.h-for-GWS-allocation.patch
new file mode 100644
index 00000000..9b46324d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2794-drm-amdkfd-Update-kfd_ioctl.h-for-GWS-allocation.patch
@@ -0,0 +1,52 @@
+From 2c38121f90061bfc677fbb682706ce565f260823 Mon Sep 17 00:00:00 2001
+From: Felix Kuehling <Felix.Kuehling@amd.com>
+Date: Tue, 28 May 2019 14:59:08 -0400
+Subject: [PATCH 2794/2940] drm/amdkfd: Update kfd_ioctl.h for GWS allocation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The ioctl numbering on amd-kfd-staging and amd-staging-dkms must be
+compatible with amd-staging-drm-next (upstream). That means, some of
+the ioctls that aren’t upstream yet will need to be renumbered. This
+also means we’ll break the user mode ABI for those non-upstream ioctl
+functions.
+
+I’m planning to upstream the IPC import/export functions soon. So
+lets renumber those to 0x1F and 0x20 so they will be just after the
+new GWS function and upstreaming won’t need to renumber them again.
+CROSS_MEMORY_COPY will probably never go upstream, so we can move
+that to a higher number (0x22). DBG_TRAP will probably go upstream in
+a few months. We can leave it at its current number (0x21) and avoid
+breaking the debugger ABI.
+
+Change-Id: I8236909c0d41384065af5ed1ed59e4faceeb0bd4
+Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ include/uapi/linux/kfd_ioctl.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
+index 3e4346530011..082f28493e14 100644
+--- a/include/uapi/linux/kfd_ioctl.h
++++ b/include/uapi/linux/kfd_ioctl.h
+@@ -653,13 +653,13 @@ struct kfd_ioctl_cross_memory_copy_args {
+ AMDKFD_IOWR(0x1E, struct kfd_ioctl_alloc_queue_gws_args)
+
+ #define AMDKFD_IOC_IPC_IMPORT_HANDLE \
+- AMDKFD_IOWR(0x1E, struct kfd_ioctl_ipc_import_handle_args)
++ AMDKFD_IOWR(0x1F, struct kfd_ioctl_ipc_import_handle_args)
+
+ #define AMDKFD_IOC_IPC_EXPORT_HANDLE \
+- AMDKFD_IOWR(0x1F, struct kfd_ioctl_ipc_export_handle_args)
++ AMDKFD_IOWR(0x20, struct kfd_ioctl_ipc_export_handle_args)
+
+ #define AMDKFD_IOC_CROSS_MEMORY_COPY \
+- AMDKFD_IOWR(0x20, struct kfd_ioctl_cross_memory_copy_args)
++ AMDKFD_IOWR(0x22, struct kfd_ioctl_cross_memory_copy_args)
+
+ #define AMDKFD_IOC_DBG_TRAP \
+ AMDKFD_IOW(0x21, struct kfd_ioctl_dbg_trap_args)
+--
+2.17.1
+