Skip to contentSkip to conversation

drm/radeon/cik: properly set compute ring status on disable

PATCH New Alex Deucher 1 participant 1 message Mar 12, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/cik: properly set compute ring status on disable

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.

---
 drivers/gpu/drm/radeon/cik.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/cik.c +4 -1
index e22be84..bbb1784 100644
@@ -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);
 }
 
Signature · 1 line
1.8.3.1