summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/cikd.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-06-14 10:42:22 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-07-14 10:11:29 -0400
commit3ec7d11b9a8f280cd68e53d4a7877624cc002e43 (patch)
treedc0b72535475021e7bdd43c5c923ef7c75da886a /drivers/gpu/drm/radeon/cikd.h
parentfbf6dc7ac7291841f53367d461a01a8e8bad0369 (diff)
downloadlinux-3ec7d11b9a8f280cd68e53d4a7877624cc002e43.tar.bz2
drm/radeon: add fault decode function for CIK
Helpful for debugging GPUVM errors as we can see what hw block and page generated the fault in the log. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/cikd.h')
-rw-r--r--drivers/gpu/drm/radeon/cikd.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/cikd.h b/drivers/gpu/drm/radeon/cikd.h
index 63514b95889a..7e9275eaef80 100644
--- a/drivers/gpu/drm/radeon/cikd.h
+++ b/drivers/gpu/drm/radeon/cikd.h
@@ -136,6 +136,22 @@
#define VM_INVALIDATE_RESPONSE 0x147c
#define VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x14DC
+#define PROTECTIONS_MASK (0xf << 0)
+#define PROTECTIONS_SHIFT 0
+ /* bit 0: range
+ * bit 1: pde0
+ * bit 2: valid
+ * bit 3: read
+ * bit 4: write
+ */
+#define MEMORY_CLIENT_ID_MASK (0xff << 12)
+#define MEMORY_CLIENT_ID_SHIFT 12
+#define MEMORY_CLIENT_RW_MASK (1 << 24)
+#define MEMORY_CLIENT_RW_SHIFT 24
+#define FAULT_VMID_MASK (0xf << 25)
+#define FAULT_VMID_SHIFT 25
+
+#define VM_CONTEXT1_PROTECTION_FAULT_MCCLIENT 0x14E4
#define VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x14FC