From 7c81389f0109c6a5b160a77e5253377cdcbd7d48 Mon Sep 17 00:00:00 2001 From: Philip Cox Date: Mon, 7 Oct 2019 10:56:09 -0400 Subject: [PATCH] Add kfd debugger version support To check the KFD debugger API support, we need to be able to check the major/minor version of the kfd debugger version, so we need to expose this function from the kernel. Change-Id: I8a3dc617607e2efa9e65306d08b8583b8b1a2172 Signed-off-by: Philip Cox [ROCm/ROCR-Runtime commit: 35d56297d3709415c71a85aef16a9a9c3c5f8069] --- projects/rocr-runtime/include/linux/kfd_ioctl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/rocr-runtime/include/linux/kfd_ioctl.h b/projects/rocr-runtime/include/linux/kfd_ioctl.h index 89a18cda15..66c72c9f8d 100644 --- a/projects/rocr-runtime/include/linux/kfd_ioctl.h +++ b/projects/rocr-runtime/include/linux/kfd_ioctl.h @@ -28,6 +28,8 @@ #define KFD_IOCTL_MAJOR_VERSION 1 #define KFD_IOCTL_MINOR_VERSION 2 +#define KFD_IOCTL_DBG_MAJOR_VERSION 0 +#define KFD_IOCTL_DBG_MINOR_VERSION 2 struct kfd_ioctl_get_version_args { __u32 major_version; /* from KFD */ @@ -252,6 +254,14 @@ struct kfd_ioctl_dbg_wave_control_args { */ #define KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT 6 +/* KFD_IOC_DBG_TRAP_GET_VERSION: + * prt: unsused + * data1: major version (OUT) + * data2: minor version (OUT) + * data3: unused + */ +#define KFD_IOC_DBG_TRAP_GET_VERSION 8 + struct kfd_ioctl_dbg_trap_args { __u64 ptr; /* to KFD -- used for pointer arguments: queue arrays */ __u32 pid; /* to KFD */