aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-01-23 19:00:25 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-01-31 16:24:56 -0500
commitf770d78ac159a96071e3c4e4ab97c262e79506d3 (patch)
tree7be959d9a91870b18082ce1077be019f6915af75
parent90fb87791a698ae16af374aaaa9540fde37f6195 (diff)
drm/radeon: halt engines before disabling MC (si)
It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/si.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 7a8ca728f36f..89b564ec3d34 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -2220,11 +2220,6 @@ static void si_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
2220 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", 2220 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
2221 RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS)); 2221 RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS));
2222 2222
2223 evergreen_mc_stop(rdev, &save);
2224 if (evergreen_mc_wait_for_idle(rdev)) {
2225 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
2226 }
2227
2228 /* Disable CP parsing/prefetching */ 2223 /* Disable CP parsing/prefetching */
2229 WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT); 2224 WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT);
2230 2225
@@ -2241,6 +2236,13 @@ static void si_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
2241 WREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET, tmp); 2236 WREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET, tmp);
2242 } 2237 }
2243 2238
2239 udelay(50);
2240
2241 evergreen_mc_stop(rdev, &save);
2242 if (evergreen_mc_wait_for_idle(rdev)) {
2243 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
2244 }
2245
2244 if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE | RADEON_RESET_CP)) { 2246 if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE | RADEON_RESET_CP)) {
2245 grbm_soft_reset = SOFT_RESET_CB | 2247 grbm_soft_reset = SOFT_RESET_CB |
2246 SOFT_RESET_DB | 2248 SOFT_RESET_DB |