drm/radeon/cik: properly set compute ring status on disable
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Mar 2014 20:20:44 +0000 (16:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Mar 2014 20:20:44 +0000 (16:20 -0400)
When we disable the rings, set the status properly.  If
not other code pathes may try and use the rings which are
not functional at this point.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/cik.c

index e22be8458d92783f426a699d2e3feef271b7a3f0..bbb17841a9e57ad2fdc44425a26d658848892f4c 100644 (file)
@@ -4134,8 +4134,11 @@ static void cik_cp_compute_enable(struct radeon_device *rdev, bool enable)
 {
        if (enable)
                WREG32(CP_MEC_CNTL, 0);
-       else
+       else {
                WREG32(CP_MEC_CNTL, (MEC_ME1_HALT | MEC_ME2_HALT));
+               rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX].ready = false;
+               rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX].ready = false;
+       }
        udelay(50);
 }