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)
committerJiri Slaby <jslaby@suse.cz>
Sat, 22 Mar 2014 21:02:00 +0000 (22:02 +0100)
commit b2b3d8d952e4f8d6ac2ce80be96b937f29f6e42e upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpu/drm/radeon/cik.c

index 071b77cc6c82ea581a79ee82f9f197ca750679c1..25370ac56b4be540f31600999d768379bfe5db74 100644 (file)
@@ -3517,8 +3517,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);
 }