History

drm/amdgpu: add new INFO ioctl query for the last GPU page fault

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

Alex Deucher committed 6 years ago

Commit 7a41ed81 parent 9cff0875 files · +63 −5Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/drm/amdgpu_drm.h+16−0
@@ -906,6 +906,8 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow { · 905 unmodified lines
906 #define AMDGPU_INFO_VIDEO_CAPS_ENCODE 1906 #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 0x22908#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 0912#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0
911#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff913#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
1244struct drm_amdgpu_info_gpuvm_fault {
1245 __u64 addr;
1246 __u32 status;
1247 __u32 vmhub;
1248};
1249
1234/*1250/*
1235 * Supported GPU families1251 * Supported GPU families
1236 */1252 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t