diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-07-29 20:23:40 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-07-29 20:23:50 -0400 |
| commit | ecd7963f7cf967009882fd56eaee1e87a229bea2 (patch) | |
| tree | 21d8c2583d94f26894202433adf46b98d25bf698 /include/uapi/linux | |
| parent | 6d52aacd92c60331ec8c3117522f4301b5195e28 (diff) | |
| parent | b5aa3f4aef724e9c0f626dcf69948b22efcc5176 (diff) | |
Merge tag 'drm-amdkfd-next-2018-07-28' of git://people.freedesktop.org/~gabbayo/linux into drm-next
This is amdkfd pull for 4.19. The major changes are:
- Add Raven support. Raven refers to Ryzen APUs with integrated GFXv9 GPU.
- Integrate GPU reset support
In addition, there are a couple of small fixes and improvements, such as:
- Better handling and reporting to user of VM faults
- Fix race upon context restore
- Allow the user to use specific Compute Units
- Basic power management
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180728122306.GA5235@ogabbay-vm
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/kfd_ioctl.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index b4f5073dbac2..01674b56e14f 100644 --- a/include/uapi/linux/kfd_ioctl.h +++ b/include/uapi/linux/kfd_ioctl.h | |||
| @@ -76,6 +76,12 @@ struct kfd_ioctl_update_queue_args { | |||
| 76 | __u32 queue_priority; /* to KFD */ | 76 | __u32 queue_priority; /* to KFD */ |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | struct kfd_ioctl_set_cu_mask_args { | ||
| 80 | __u32 queue_id; /* to KFD */ | ||
| 81 | __u32 num_cu_mask; /* to KFD */ | ||
| 82 | __u64 cu_mask_ptr; /* to KFD */ | ||
| 83 | }; | ||
| 84 | |||
| 79 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ | 85 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ |
| 80 | #define KFD_IOC_CACHE_POLICY_COHERENT 0 | 86 | #define KFD_IOC_CACHE_POLICY_COHERENT 0 |
| 81 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 | 87 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 |
| @@ -189,6 +195,15 @@ struct kfd_ioctl_dbg_wave_control_args { | |||
| 189 | 195 | ||
| 190 | #define KFD_SIGNAL_EVENT_LIMIT 4096 | 196 | #define KFD_SIGNAL_EVENT_LIMIT 4096 |
| 191 | 197 | ||
| 198 | /* For kfd_event_data.hw_exception_data.reset_type. */ | ||
| 199 | #define KFD_HW_EXCEPTION_WHOLE_GPU_RESET 0 | ||
| 200 | #define KFD_HW_EXCEPTION_PER_ENGINE_RESET 1 | ||
| 201 | |||
| 202 | /* For kfd_event_data.hw_exception_data.reset_cause. */ | ||
| 203 | #define KFD_HW_EXCEPTION_GPU_HANG 0 | ||
| 204 | #define KFD_HW_EXCEPTION_ECC 1 | ||
| 205 | |||
| 206 | |||
| 192 | struct kfd_ioctl_create_event_args { | 207 | struct kfd_ioctl_create_event_args { |
| 193 | __u64 event_page_offset; /* from KFD */ | 208 | __u64 event_page_offset; /* from KFD */ |
| 194 | __u32 event_trigger_data; /* from KFD - signal events only */ | 209 | __u32 event_trigger_data; /* from KFD - signal events only */ |
| @@ -219,7 +234,7 @@ struct kfd_memory_exception_failure { | |||
| 219 | __u32 NotPresent; /* Page not present or supervisor privilege */ | 234 | __u32 NotPresent; /* Page not present or supervisor privilege */ |
| 220 | __u32 ReadOnly; /* Write access to a read-only page */ | 235 | __u32 ReadOnly; /* Write access to a read-only page */ |
| 221 | __u32 NoExecute; /* Execute access to a page marked NX */ | 236 | __u32 NoExecute; /* Execute access to a page marked NX */ |
| 222 | __u32 pad; | 237 | __u32 imprecise; /* Can't determine the exact fault address */ |
| 223 | }; | 238 | }; |
| 224 | 239 | ||
| 225 | /* memory exception data*/ | 240 | /* memory exception data*/ |
| @@ -230,10 +245,19 @@ struct kfd_hsa_memory_exception_data { | |||
| 230 | __u32 pad; | 245 | __u32 pad; |
| 231 | }; | 246 | }; |
| 232 | 247 | ||
| 233 | /* Event data*/ | 248 | /* hw exception data */ |
| 249 | struct kfd_hsa_hw_exception_data { | ||
| 250 | uint32_t reset_type; | ||
| 251 | uint32_t reset_cause; | ||
| 252 | uint32_t memory_lost; | ||
| 253 | uint32_t gpu_id; | ||
| 254 | }; | ||
| 255 | |||
| 256 | /* Event data */ | ||
| 234 | struct kfd_event_data { | 257 | struct kfd_event_data { |
| 235 | union { | 258 | union { |
| 236 | struct kfd_hsa_memory_exception_data memory_exception_data; | 259 | struct kfd_hsa_memory_exception_data memory_exception_data; |
| 260 | struct kfd_hsa_hw_exception_data hw_exception_data; | ||
| 237 | }; /* From KFD */ | 261 | }; /* From KFD */ |
| 238 | __u64 kfd_event_data_ext; /* pointer to an extension structure | 262 | __u64 kfd_event_data_ext; /* pointer to an extension structure |
| 239 | for future exception types */ | 263 | for future exception types */ |
| @@ -448,7 +472,10 @@ struct kfd_ioctl_unmap_memory_from_gpu_args { | |||
| 448 | #define AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU \ | 472 | #define AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU \ |
| 449 | AMDKFD_IOWR(0x19, struct kfd_ioctl_unmap_memory_from_gpu_args) | 473 | AMDKFD_IOWR(0x19, struct kfd_ioctl_unmap_memory_from_gpu_args) |
| 450 | 474 | ||
| 475 | #define AMDKFD_IOC_SET_CU_MASK \ | ||
| 476 | AMDKFD_IOW(0x1A, struct kfd_ioctl_set_cu_mask_args) | ||
| 477 | |||
| 451 | #define AMDKFD_COMMAND_START 0x01 | 478 | #define AMDKFD_COMMAND_START 0x01 |
| 452 | #define AMDKFD_COMMAND_END 0x1A | 479 | #define AMDKFD_COMMAND_END 0x1B |
| 453 | 480 | ||
| 454 | #endif | 481 | #endif |
