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