drm/radeon: halt engines before disabling MC (cayman/TN)
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Jan 2013 23:59:17 +0000 (18:59 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 31 Jan 2013 21:24:56 +0000 (16:24 -0500)
It's better to halt the engines before we disable the MC.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/ni.c

index eee013f5699a5476fcbf1d4ad28f76dec67008a3..4784c4e5056fb64ed1383c0fee7e9a393ed5fb06 100644 (file)
@@ -1405,13 +1405,6 @@ static void cayman_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
        dev_info(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
                 RREG32(0x14DC));
 
-       r600_set_bios_scratch_engine_hung(rdev, true);
-
-       evergreen_mc_stop(rdev, &save);
-       if (evergreen_mc_wait_for_idle(rdev)) {
-               dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
-       }
-
        /* Disable CP parsing/prefetching */
        WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT);
 
@@ -1429,6 +1422,13 @@ static void cayman_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
                WREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET, tmp);
        }
 
+       udelay(50);
+
+       evergreen_mc_stop(rdev, &save);
+       if (evergreen_mc_wait_for_idle(rdev)) {
+               dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
+       }
+
        if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE)) {
                grbm_soft_reset = SOFT_RESET_CB |
                        SOFT_RESET_DB |