summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-02-18 18:03:22 +0400
committerChristian König <christian.koenig@amd.com>2014-02-18 20:50:07 +0400
commit82dc62a31ce3ed7b4eeea9c65a3b69e81e2ea688 (patch)
tree13284047757d183a574c6f752d704fc113c52887 /drivers
parent2d2fe3f9b60fd3cc9a19dcc3ae892a23825da07f (diff)
downloadlinux-82dc62a31ce3ed7b4eeea9c65a3b69e81e2ea688.tar.xz
drm/radeon: cleanup false positive lockup handling
Check always when we calculate the free dw, not just the first time. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 668097abb424..b14c86d57607 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -349,7 +349,10 @@ void radeon_ring_free_size(struct radeon_device *rdev, struct radeon_ring *ring)
ring->ring_free_dw -= ring->wptr;
ring->ring_free_dw &= ring->ptr_mask;
if (!ring->ring_free_dw) {
+ /* this is an empty ring */
ring->ring_free_dw = ring->ring_size / 4;
+ /* update lockup info to avoid false positive */
+ radeon_ring_lockup_update(rdev, ring);
}
}
@@ -373,12 +376,6 @@ int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *ring, unsi
/* 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(rdev, ring);
- }
ndw = (ndw + ring->align_mask) & ~ring->align_mask;
while (ndw > (ring->ring_free_dw - 1)) {
radeon_ring_free_size(rdev, ring);