diff options
| author | Shaoyun Liu <Shaoyun.Liu@amd.com> | 2018-07-11 22:32:53 -0400 |
|---|---|---|
| committer | Oded Gabbay <oded.gabbay@gmail.com> | 2018-07-11 22:32:53 -0400 |
| commit | 0c119abad7f0d7987c3ce4ea76b30bde76d0436e (patch) | |
| tree | 85d8af3c18ef7416c2787a3facd50a80685b93d4 /include/uapi/linux | |
| parent | 6d15ca0af0e070e67863c46b54d14f3664d925b4 (diff) | |
drm/amd: Add kfd ioctl defines for hw_exception event
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/kfd_ioctl.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index 46a54ab1e728..88d17c39dbf9 100644 --- a/include/uapi/linux/kfd_ioctl.h +++ b/include/uapi/linux/kfd_ioctl.h | |||
| @@ -189,6 +189,15 @@ struct kfd_ioctl_dbg_wave_control_args { | |||
| 189 | 189 | ||
| 190 | #define KFD_SIGNAL_EVENT_LIMIT 4096 | 190 | #define KFD_SIGNAL_EVENT_LIMIT 4096 |
| 191 | 191 | ||
| 192 | /* For kfd_event_data.hw_exception_data.reset_type. */ | ||
| 193 | #define KFD_HW_EXCEPTION_WHOLE_GPU_RESET 0 | ||
| 194 | #define KFD_HW_EXCEPTION_PER_ENGINE_RESET 1 | ||
| 195 | |||
| 196 | /* For kfd_event_data.hw_exception_data.reset_cause. */ | ||
| 197 | #define KFD_HW_EXCEPTION_GPU_HANG 0 | ||
| 198 | #define KFD_HW_EXCEPTION_ECC 1 | ||
| 199 | |||
| 200 | |||
| 192 | struct kfd_ioctl_create_event_args { | 201 | struct kfd_ioctl_create_event_args { |
| 193 | __u64 event_page_offset; /* from KFD */ | 202 | __u64 event_page_offset; /* from KFD */ |
| 194 | __u32 event_trigger_data; /* from KFD - signal events only */ | 203 | __u32 event_trigger_data; /* from KFD - signal events only */ |
| @@ -230,10 +239,19 @@ struct kfd_hsa_memory_exception_data { | |||
| 230 | __u32 pad; | 239 | __u32 pad; |
| 231 | }; | 240 | }; |
| 232 | 241 | ||
| 233 | /* Event data*/ | 242 | /* hw exception data */ |
| 243 | struct kfd_hsa_hw_exception_data { | ||
| 244 | uint32_t reset_type; | ||
| 245 | uint32_t reset_cause; | ||
| 246 | uint32_t memory_lost; | ||
| 247 | uint32_t gpu_id; | ||
| 248 | }; | ||
| 249 | |||
| 250 | /* Event data */ | ||
| 234 | struct kfd_event_data { | 251 | struct kfd_event_data { |
| 235 | union { | 252 | union { |
| 236 | struct kfd_hsa_memory_exception_data memory_exception_data; | 253 | struct kfd_hsa_memory_exception_data memory_exception_data; |
| 254 | struct kfd_hsa_hw_exception_data hw_exception_data; | ||
| 237 | }; /* From KFD */ | 255 | }; /* From KFD */ |
| 238 | __u64 kfd_event_data_ext; /* pointer to an extension structure | 256 | __u64 kfd_event_data_ext; /* pointer to an extension structure |
| 239 | for future exception types */ | 257 | for future exception types */ |
