aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/2794-drm-amdkfd-Update-kfd_ioctl.h-for-GWS-allocation.patch
blob: 9b46324d546d1e65b9e0c276242a594b4d0d8968 (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
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