aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/si.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-09-18 15:30:44 -0400
committerAlex Deucher <alexander.deucher@amd.com>2012-12-07 19:48:06 -0500
commitae133a1129790ec288b429b5f08ab4701633844a (patch)
tree5b42bfef6981335fa6113b6830e07902cc02652b /drivers/gpu/drm/radeon/si.c
parent1c4c3a99435c8891469fe6fca5ccd5fbe16f295a (diff)
drm/radeon: stop page faults from hanging the system (v2)
Redirect invalid memory accesses to the default page instead of locking up the memory controller. Also enable the invalid memory access interrupts and start spamming system log with it. v2 (agd5f): fix up against 2 level PT changes Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/radeon/si.c')
-rw-r--r--drivers/gpu/drm/radeon/si.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 4422d630b33b..c4d9eb623ce5 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -2426,9 +2426,20 @@ static int si_pcie_gart_enable(struct radeon_device *rdev)
2426 /* enable context1-15 */ 2426 /* enable context1-15 */
2427 WREG32(VM_CONTEXT1_PROTECTION_FAULT_DEFAULT_ADDR, 2427 WREG32(VM_CONTEXT1_PROTECTION_FAULT_DEFAULT_ADDR,
2428 (u32)(rdev->dummy_page.addr >> 12)); 2428 (u32)(rdev->dummy_page.addr >> 12));
2429 WREG32(VM_CONTEXT1_CNTL2, 0); 2429 WREG32(VM_CONTEXT1_CNTL2, 4);
2430 WREG32(VM_CONTEXT1_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(1) | 2430 WREG32(VM_CONTEXT1_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(1) |
2431 RANGE_PROTECTION_FAULT_ENABLE_DEFAULT); 2431 RANGE_PROTECTION_FAULT_ENABLE_INTERRUPT |
2432 RANGE_PROTECTION_FAULT_ENABLE_DEFAULT |
2433 DUMMY_PAGE_PROTECTION_FAULT_ENABLE_INTERRUPT |
2434 DUMMY_PAGE_PROTECTION_FAULT_ENABLE_DEFAULT |
2435 PDE0_PROTECTION_FAULT_ENABLE_INTERRUPT |
2436 PDE0_PROTECTION_FAULT_ENABLE_DEFAULT |
2437 VALID_PROTECTION_FAULT_ENABLE_INTERRUPT |
2438 VALID_PROTECTION_FAULT_ENABLE_DEFAULT |
2439 READ_PROTECTION_FAULT_ENABLE_INTERRUPT |
2440 READ_PROTECTION_FAULT_ENABLE_DEFAULT |
2441 WRITE_PROTECTION_FAULT_ENABLE_INTERRUPT |
2442 WRITE_PROTECTION_FAULT_ENABLE_DEFAULT);
2432 2443
2433 si_pcie_gart_tlb_flush(rdev); 2444 si_pcie_gart_tlb_flush(rdev);
2434 DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n", 2445 DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n",
@@ -3684,6 +3695,16 @@ restart_ih:
3684 break; 3695 break;
3685 } 3696 }
3686 break; 3697 break;
3698 case 146:
3699 case 147:
3700 dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", src_id, src_data);
3701 dev_err(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
3702 RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR));
3703 dev_err(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
3704 RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS));
3705 /* reset addr and status */
3706 WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
3707 break;
3687 case 176: /* RINGID0 CP_INT */ 3708 case 176: /* RINGID0 CP_INT */
3688 radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX); 3709 radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
3689 break; 3710 break;