summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/nid.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-06-13 18:26:25 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-07-14 10:11:28 -0400
commit54e2e49ce28ff7ac67b93e7e9e44702552b04a69 (patch)
tree8d24bc3fabb6dfd63fd9a6078fd0b0639222ab73 /drivers/gpu/drm/radeon/nid.h
parent0a168933976eb483da91161316bbbbcb74d00486 (diff)
downloadblackbird-op-linux-54e2e49ce28ff7ac67b93e7e9e44702552b04a69.tar.gz
blackbird-op-linux-54e2e49ce28ff7ac67b93e7e9e44702552b04a69.zip
drm/radeon: add fault decode function for cayman/TN (v2)
Helpful for debugging GPUVM errors as we can see what hw block and page generated the fault in the log. v2: simplify fault decoding Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/nid.h')
-rw-r--r--drivers/gpu/drm/radeon/nid.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/nid.h b/drivers/gpu/drm/radeon/nid.h
index fe24a93542ec..22421bc80c0d 100644
--- a/drivers/gpu/drm/radeon/nid.h
+++ b/drivers/gpu/drm/radeon/nid.h
@@ -133,6 +133,22 @@
#define VM_CONTEXT1_CNTL2 0x1434
#define VM_INVALIDATE_REQUEST 0x1478
#define VM_INVALIDATE_RESPONSE 0x147c
+#define VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x14FC
+#define VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x14DC
+#define PROTECTIONS_MASK (0xf << 0)
+#define PROTECTIONS_SHIFT 0
+ /* bit 0: range
+ * bit 2: pde0
+ * bit 3: valid
+ * bit 4: read
+ * bit 5: 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 (0x7 << 25)
+#define FAULT_VMID_SHIFT 25
#define VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR 0x1518
#define VM_CONTEXT1_PROTECTION_FAULT_DEFAULT_ADDR 0x151c
#define VM_CONTEXT0_PAGE_TABLE_BASE_ADDR 0x153C
OpenPOWER on IntegriCloud