Don't alloc/free VRAM in map/unmap paths

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
This commit is contained in:
Oded Gabbay
2015-02-23 15:54:01 +02:00
parent 027ca02f2e
commit e62d46ba1c
2 changed files with 154 additions and 37 deletions
+20 -6
View File
@@ -229,7 +229,7 @@ struct kfd_ioctl_wait_events_args {
uint32_t wait_result; /* from KFD */
};
struct kfd_ioctl_map_memory_to_gpu_args {
struct kfd_ioctl_alloc_memory_of_gpu_args {
uint64_t va_addr; /* to KFD */
uint64_t size; /* to KFD */
uint64_t handle; /* from KFD */
@@ -237,6 +237,14 @@ struct kfd_ioctl_map_memory_to_gpu_args {
uint32_t pad;
};
struct kfd_ioctl_free_memory_of_gpu_args {
uint64_t handle; /* to KFD */
};
struct kfd_ioctl_map_memory_to_gpu_args {
uint64_t handle; /* to KFD */
};
struct kfd_ioctl_unmap_memory_from_gpu_args {
uint64_t handle; /* to KFD */
};
@@ -304,16 +312,22 @@ struct kfd_ioctl_open_graphic_handle_args {
#define AMDKFD_IOC_DBG_WAVE_CONTROL \
AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args)
#define AMDKFD_IOC_ALLOC_MEMORY_OF_GPU \
AMDKFD_IOWR(0x11, struct kfd_ioctl_alloc_memory_of_gpu_args)
#define AMDKFD_IOC_FREE_MEMORY_OF_GPU \
AMDKFD_IOWR(0x12, struct kfd_ioctl_free_memory_of_gpu_args)
#define AMDKFD_IOC_MAP_MEMORY_TO_GPU \
AMDKFD_IOWR(0x11, struct kfd_ioctl_map_memory_to_gpu_args)
AMDKFD_IOWR(0x13, struct kfd_ioctl_map_memory_to_gpu_args)
#define AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU \
AMDKFD_IOWR(0x12, struct kfd_ioctl_unmap_memory_from_gpu_args)
AMDKFD_IOWR(0x14, struct kfd_ioctl_unmap_memory_from_gpu_args)
#define AMDKFD_IOC_OPEN_GRAPHIC_HANDLE \
AMDKFD_IOWR(0x13, struct kfd_ioctl_open_graphic_handle_args)
AMDKFD_IOWR(0x15, struct kfd_ioctl_open_graphic_handle_args)
#define AMDKFD_COMMAND_START 0x01
#define AMDKFD_COMMAND_END 0x14
#define AMDKFD_COMMAND_START 0x01
#define AMDKFD_COMMAND_END 0x16
#endif