From 19dacdecd3ce2592efa6c046afc342c08868dced Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Thu, 1 Mar 2018 16:54:41 -0500 Subject: [PATCH] Update kfd_ioctl.h from kernel This adds new acquire_vm ioctl. Change-Id: Ia6794bfd291706cecdb2d06f4902b324b48577df Signed-off-by: Felix Kuehling --- include/linux/kfd_ioctl.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/include/linux/kfd_ioctl.h b/include/linux/kfd_ioctl.h index ae79f16e1d..b0226ea526 100644 --- a/include/linux/kfd_ioctl.h +++ b/include/linux/kfd_ioctl.h @@ -278,6 +278,11 @@ struct kfd_ioctl_alloc_memory_of_scratch_args { uint32_t pad; }; +struct kfd_ioctl_acquire_vm_args { + uint32_t drm_fd; /* to KFD */ + uint32_t gpu_id; /* to KFD */ +}; + /* Allocation flags: memory types */ #define KFD_IOC_ALLOC_MEM_FLAGS_VRAM (1 << 0) #define KFD_IOC_ALLOC_MEM_FLAGS_GTT (1 << 1) @@ -361,22 +366,22 @@ struct kfd_ioctl_ipc_import_handle_args { struct kfd_ioctl_get_tile_config_args { /* to KFD: pointer to tile array */ - uint64_t tile_config_ptr; + __u64 tile_config_ptr; /* to KFD: pointer to macro tile array */ - uint64_t macro_tile_config_ptr; + __u64 macro_tile_config_ptr; /* to KFD: array size allocated by user mode * from KFD: array size filled by kernel */ - uint32_t num_tile_configs; + __u32 num_tile_configs; /* to KFD: array size allocated by user mode * from KFD: array size filled by kernel */ - uint32_t num_macro_tile_configs; + __u32 num_macro_tile_configs; - uint32_t gpu_id; /* to KFD */ - uint32_t gb_addr_config; /* from KFD */ - uint32_t num_banks; /* from KFD */ - uint32_t num_ranks; /* from KFD */ + __u32 gpu_id; /* to KFD */ + __u32 gb_addr_config; /* from KFD */ + __u32 num_banks; /* from KFD */ + __u32 num_ranks; /* from KFD */ /* struct size can be extended later if needed * without breaking ABI compatibility */ @@ -516,7 +521,10 @@ struct kfd_ioctl_cross_memory_copy_args { #define AMDKFD_IOC_GET_QUEUE_WAVE_STATE \ AMDKFD_IOWR(0x20, struct kfd_ioctl_get_queue_wave_state_args) +#define AMDKFD_IOC_ACQUIRE_VM \ + AMDKFD_IOW(0x21, struct kfd_ioctl_acquire_vm_args) + #define AMDKFD_COMMAND_START 0x01 -#define AMDKFD_COMMAND_END 0x21 +#define AMDKFD_COMMAND_END 0x22 #endif