Skip to contentSkip to conversation

drm/radeon: update lockup tracking when scheduling in empty ring

PATCH In review [email protected] 2 participants 2 messages Jun 19, 2013

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

PATCH 1/1 drm/radeon: update lockup tracking when scheduling in empty ring

From: Jerome Glisse <[email protected]>

There might be issue with lockup detection when scheduling on an empty ring that have been sitting idle for a while. Thus update the lockup tracking data when scheduling new work in an empty ring.

---
 drivers/gpu/drm/radeon/radeon_ring.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/radeon/radeon_ring.c +7 -0
index e17faa7..82434018 100644
@@ -402,6 +402,13 @@ int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *ring, unsi
 		return -ENOMEM;
 	/* Align requested size with padding so unlock_commit can
 	 * pad safely */
+	radeon_ring_free_size(rdev, ring);
+	if (ring->ring_free_dw == (ring->ring_size / 4)) {
+		/* This is an empty ring update lockup info to avoid
+		 * false positive.
+		 */
+		radeon_ring_lockup_update(ring);
+	}
 	ndw = (ndw + ring->align_mask) & ~ring->align_mask;
 	while (ndw > (ring->ring_free_dw - 1)) {
 		radeon_ring_free_size(rdev, ring);
Signature · 1 line
1.7.11.7
Reviewed-by on v1 1/1
#1 lore raw

Am 19.06.2013 16:02, schrieb [email protected]:

Quoted 9 lines

From: Jerome Glisse <[email protected]>

There might be issue with lockup detection when scheduling on an empty ring that have been sitting idle for a while. Thus update the lockup tracking data when scheduling new work in an empty ring.

Quoted 22 lines
---
  drivers/gpu/drm/radeon/radeon_ring.c | 7 +++++++
  1 file changed, 7 insertions(+)
drivers/gpu/drm/radeon/radeon_ring.c +7 -0
index e17faa7..82434018 100644
@@ -402,6 +402,13 @@ int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *ring, unsi
  		return -ENOMEM;
  	/* Align requested size with padding so unlock_commit can
  	 * pad safely */
+	radeon_ring_free_size(rdev, ring);
+	if (ring->ring_free_dw == (ring->ring_size / 4)) {
+		/* This is an empty ring update lockup info to avoid
+		 * false positive.
+		 */
+		radeon_ring_lockup_update(ring);
+	}
  	ndw = (ndw + ring->align_mask) & ~ring->align_mask;
  	while (ndw > (ring->ring_free_dw - 1)) {
  		radeon_ring_free_size(rdev, ring);