]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2014 04:44:15 +0000 (21:44 -0700)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/cik.c

index d955c3985fcbc94d3834277db970be0e1a433a77..272392da220d03655fe73982ab18678e03136344 100644 (file)
@@ -4069,8 +4069,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);
 }