Merge remote-tracking branch 'regulator/topic/isl6271a' into regulator-next
[linux-2.6-microblaze.git] / drivers / gpu / drm / radeon / radeon_ring.c
index e17faa7..8243401 100644 (file)
@@ -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);