Update kfd_ioctl.h from kernel
Change-Id: I9852ef2e33e1f3b24343747e3c1c09b0050ffdc1
Este cometimento está contido em:
@@ -59,7 +59,7 @@ struct kfd_ioctl_create_queue_args {
|
||||
uint64_t eop_buffer_size; /* to KFD */
|
||||
uint64_t ctx_save_restore_address; /* to KFD */
|
||||
uint32_t ctx_save_restore_size; /* to KFD */
|
||||
uint32_t ctl_stack_size; /* to KFD */
|
||||
uint32_t ctl_stack_size; /* to KFD */
|
||||
};
|
||||
|
||||
struct kfd_ioctl_destroy_queue_args {
|
||||
@@ -301,18 +301,28 @@ struct kfd_ioctl_set_process_dgpu_aperture_args {
|
||||
uint64_t dgpu_limit;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_eviction_args {
|
||||
uint64_t size;
|
||||
uint64_t type;
|
||||
};
|
||||
|
||||
enum evict_type {
|
||||
EVICT_FIRST_PDD = 0,
|
||||
EVICT_BIGGEST_PDD
|
||||
};
|
||||
|
||||
/*
|
||||
* GPU Memory allocation flags
|
||||
*/
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_DGPU_HOST (1 << 0)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_DGPU_DEVICE (1 << 1)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_DGPU_HOST (1 << 0)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_DGPU_DEVICE (1 << 1)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_DGPU_SCRATCH (1 << 2)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_APU_DEVICE (1 << 3)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_APU_SCRATCH (1 << 4)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_APU_DEVICE (1 << 3)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_APU_SCRATCH (1 << 4)
|
||||
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_DGPU_AQL_QUEUE_MEM (1 << 5)
|
||||
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 6)
|
||||
#define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 6)
|
||||
|
||||
struct kfd_ioctl_alloc_memory_of_gpu_new_args {
|
||||
uint64_t va_addr; /* to KFD */
|
||||
@@ -324,13 +334,36 @@ struct kfd_ioctl_alloc_memory_of_gpu_new_args {
|
||||
};
|
||||
|
||||
struct kfd_ioctl_get_process_apertures_new_args {
|
||||
uint64_t kfd_process_device_apertures_ptr; /* pointer to struct
|
||||
struct kfd_process_device_apertures. User allocated */
|
||||
uint32_t num_of_nodes; /* Number of entries in
|
||||
kfd_process_device_apertures_ptr */
|
||||
/* User allocated. Pointer to struct kfd_process_device_apertures
|
||||
* filled in by Kernel */
|
||||
uint64_t kfd_process_device_apertures_ptr;
|
||||
|
||||
/* to KFD - indicates amount of memory present in
|
||||
* kfd_process_device_apertures_ptr
|
||||
* from KFD - Number of entries filled by KFD.
|
||||
*/
|
||||
uint32_t num_of_nodes;
|
||||
|
||||
uint32_t pad;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_get_dmabuf_info_args {
|
||||
uint64_t size; /* from KFD */
|
||||
uint64_t metadata_ptr; /* to KFD */
|
||||
uint32_t metadata_size; /* to KFD (space allocated by user)
|
||||
* from KFD (actual metadata size) */
|
||||
uint32_t gpu_id; /* from KFD */
|
||||
uint32_t flags; /* from KFD (KFD_IOC_ALLOC_MEM_FLAGS) */
|
||||
uint32_t dmabuf_fd; /* to KFD */
|
||||
};
|
||||
|
||||
struct kfd_ioctl_import_dmabuf_args {
|
||||
uint64_t va_addr; /* to KFD */
|
||||
uint64_t handle; /* from KFD */
|
||||
uint32_t gpu_id; /* to KFD */
|
||||
uint32_t dmabuf_fd; /* to KFD */
|
||||
};
|
||||
|
||||
#define AMDKFD_IOCTL_BASE 'K'
|
||||
#define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
|
||||
#define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
|
||||
@@ -407,7 +440,8 @@ struct kfd_ioctl_get_process_apertures_new_args {
|
||||
AMDKFD_IOW(0x17, struct kfd_ioctl_set_cu_mask_args)
|
||||
|
||||
#define AMDKFD_IOC_SET_PROCESS_DGPU_APERTURE \
|
||||
AMDKFD_IOW(0x18, struct kfd_ioctl_set_process_dgpu_aperture_args)
|
||||
AMDKFD_IOW(0x18, \
|
||||
struct kfd_ioctl_set_process_dgpu_aperture_args)
|
||||
|
||||
#define AMDKFD_IOC_ALLOC_MEMORY_OF_GPU_NEW \
|
||||
AMDKFD_IOWR(0x19, struct kfd_ioctl_alloc_memory_of_gpu_new_args)
|
||||
@@ -421,9 +455,18 @@ struct kfd_ioctl_get_process_apertures_new_args {
|
||||
AMDKFD_IOWR(0x1c, struct kfd_ioctl_unmap_memory_from_gpu_new_args)
|
||||
|
||||
#define AMDKFD_IOC_GET_PROCESS_APERTURES_NEW \
|
||||
AMDKFD_IOWR(0x1d, struct kfd_ioctl_get_process_apertures_new_args)
|
||||
AMDKFD_IOWR(0x1d, struct kfd_ioctl_get_process_apertures_new_args)
|
||||
|
||||
#define AMDKFD_IOC_EVICT_MEMORY \
|
||||
AMDKFD_IOWR(0x1e, struct kfd_ioctl_eviction_args)
|
||||
|
||||
#define AMDKFD_IOC_GET_DMABUF_INFO \
|
||||
AMDKFD_IOWR(0x1f, struct kfd_ioctl_get_dmabuf_info_args)
|
||||
|
||||
#define AMDKFD_IOC_IMPORT_DMABUF \
|
||||
AMDKFD_IOWR(0x20, struct kfd_ioctl_import_dmabuf_args)
|
||||
|
||||
#define AMDKFD_COMMAND_START 0x01
|
||||
#define AMDKFD_COMMAND_END 0x1e
|
||||
#define AMDKFD_COMMAND_END 0x21
|
||||
|
||||
#endif
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador