drm/radeon/cik: log and handle VM page fault interrupts
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Sep 2012 18:24:48 +0000 (14:24 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jun 2013 21:50:32 +0000 (17:50 -0400)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/cikd.h

index 72c7e83c6d8cab58c674614f0c01690b366de19b..b70f017f728983edb0fd95b9a8306b6bb9ab493a 100644 (file)
@@ -3676,6 +3676,16 @@ restart_ih:
                                break;
                        }
                        break;
+               case 146:
+               case 147:
+                       dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", src_id, src_data);
+                       dev_err(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x%08X\n",
+                               RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR));
+                       dev_err(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
+                               RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS));
+                       /* reset addr and status */
+                       WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
+                       break;
                case 176: /* GFX RB CP_INT */
                case 177: /* GFX IB CP_INT */
                        radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
index a282168eadd0492143e7c89dbdf06ddb00a7f7ec..cc4f28ec518e97e9296b54c24f37f8699dfbb9ee 100644 (file)
 #define VM_INVALIDATE_REQUEST                          0x1478
 #define VM_INVALIDATE_RESPONSE                         0x147c
 
+#define        VM_CONTEXT1_PROTECTION_FAULT_STATUS             0x14DC
+
+#define        VM_CONTEXT1_PROTECTION_FAULT_ADDR               0x14FC
+
 #define VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR      0x1518
 #define VM_CONTEXT1_PROTECTION_FAULT_DEFAULT_ADDR      0x151c