Add a interface to query the last GPU page fault for the process. Useful for debugging context lost errors. v2: split vmhub representation between kernel and userspace v3: add locking when fetching fault info in INFO IOCTL Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238 libdrm MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238
Showing the changes to include/uapi (1 of 5 files). Show all
Unified · Split
| @@ -906,6 +906,8 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow { · 905 unmodified lines | |||
| 906 | #define AMDGPU_INFO_VIDEO_CAPS_ENCODE 1 | 906 | #define AMDGPU_INFO_VIDEO_CAPS_ENCODE 1 |
| 907 | /* Query the max number of IBs per gang per submission */ | 907 | /* Query the max number of IBs per gang per submission */ |
| 908 | #define AMDGPU_INFO_MAX_IBS 0x22 | 908 | #define AMDGPU_INFO_MAX_IBS 0x22 |
| 909 | /* query last page fault info */ | ||
| 910 | #define AMDGPU_INFO_GPUVM_FAULT 0x23 | ||
| 909 | 911 | ||
| 910 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 | 912 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 |
| 911 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff | 913 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff |
| @@ -1231,6 +1233,20 @@ struct drm_amdgpu_info_video_caps { · 319 unmodified lines | |||
| 1231 | struct drm_amdgpu_info_video_codec_info codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_COUNT]; | 1233 | struct drm_amdgpu_info_video_codec_info codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_COUNT]; |
| 1232 | }; | 1234 | }; |
| 1233 | 1235 | ||
| 1236 | #define AMDGPU_VMHUB_TYPE_MASK 0xff | ||
| 1237 | #define AMDGPU_VMHUB_TYPE_SHIFT 0 | ||
| 1238 | #define AMDGPU_VMHUB_TYPE_GFX 0 | ||
| 1239 | #define AMDGPU_VMHUB_TYPE_MM0 1 | ||
| 1240 | #define AMDGPU_VMHUB_TYPE_MM1 2 | ||
| 1241 | #define AMDGPU_VMHUB_IDX_MASK 0xff00 | ||
| 1242 | #define AMDGPU_VMHUB_IDX_SHIFT 8 | ||
| 1243 | |||
| 1244 | struct drm_amdgpu_info_gpuvm_fault { | ||
| 1245 | __u64 addr; | ||
| 1246 | __u32 status; | ||
| 1247 | __u32 vmhub; | ||
| 1248 | }; | ||
| 1249 | |||
| 1234 | /* | 1250 | /* |
| 1235 | * Supported GPU families | 1251 | * Supported GPU families |
| 1236 | */ | 1252 | */ |