aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-04-26 16:23:42 -0400
committerDave Airlie <airlied@redhat.com>2010-04-26 19:48:16 -0400
commita1e9ada3e148dc300fdd25705bd3ac024897dc68 (patch)
tree3cd724dc3b385553f228dcd310c10b6f32f23ec6
parentf2594933df9719bd2b0aaaa8ea9b2b850d6e1c42 (diff)
drm/radeon/kms: R3XX-R4XX fix GPU reset code
Previous reset code leaded to computer hard lockup (need to unplug the power too reboot the computer) on various configuration. This patch change the reset code to avoid hard lockup. The GPU reset is failing most of the time but at least user can log in remotely or properly shutdown the computer. Two issues were leading to hard lockup : - Writting to the scratch register lead to hard lockup most likely because the write back mecanism is in fuzy state after GPU lockup. - Resetting the GPU memory controller and not reinitializing it after leaded to hard lockup. We did only reinitialize in case of successfull reset thus unsuccessfull reset quickly leaded to hard lockup. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/r300.c8
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c2
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index bb005bff4b08..5d622cb39b33 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -445,14 +445,6 @@ int r300_asic_reset(struct radeon_device *rdev)
445 mdelay(1); 445 mdelay(1);
446 status = RREG32(R_000E40_RBBM_STATUS); 446 status = RREG32(R_000E40_RBBM_STATUS);
447 dev_info(rdev->dev, "(%s:%d) RBBM_STATUS=0x%08X\n", __func__, __LINE__, status); 447 dev_info(rdev->dev, "(%s:%d) RBBM_STATUS=0x%08X\n", __func__, __LINE__, status);
448 /* reset MC */
449 WREG32(R_0000F0_RBBM_SOFT_RESET, S_0000F0_SOFT_RESET_MC(1));
450 RREG32(R_0000F0_RBBM_SOFT_RESET);
451 mdelay(500);
452 WREG32(R_0000F0_RBBM_SOFT_RESET, 0);
453 mdelay(1);
454 status = RREG32(R_000E40_RBBM_STATUS);
455 dev_info(rdev->dev, "(%s:%d) RBBM_STATUS=0x%08X\n", __func__, __LINE__, status);
456 /* restore PCI & busmastering */ 448 /* restore PCI & busmastering */
457 pci_restore_state(rdev->pdev); 449 pci_restore_state(rdev->pdev);
458 r100_enable_bm(rdev); 450 r100_enable_bm(rdev);
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 1b8b9cc271f2..b1f9a81b5d1d 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -237,10 +237,10 @@ retry:
237 * as signaled for now 237 * as signaled for now
238 */ 238 */
239 rdev->gpu_lockup = true; 239 rdev->gpu_lockup = true;
240 WREG32(rdev->fence_drv.scratch_reg, fence->seq);
241 r = radeon_gpu_reset(rdev); 240 r = radeon_gpu_reset(rdev);
242 if (r) 241 if (r)
243 return r; 242 return r;
243 WREG32(rdev->fence_drv.scratch_reg, fence->seq);
244 rdev->gpu_lockup = false; 244 rdev->gpu_lockup = false;
245 } 245 }
246 timeout = RADEON_FENCE_JIFFIES_TIMEOUT; 246 timeout = RADEON_FENCE_JIFFIES_TIMEOUT;