aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-03-15 06:24:32 -0400
committerDave Airlie <airlied@redhat.com>2012-03-15 06:24:32 -0400
commit8229c885fe361e521ac64de36b16011e54a30de0 (patch)
tree572e5d34b16713ddef9e803308c6f72014aff01b /drivers/gpu/drm/i915/intel_ringbuffer.c
parentc3c50e8b651887bcefcc13beb3739c00b2379b5c (diff)
parentfde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff)
drm: Merge tag 'v3.3-rc7' into drm-core-next
Merge the fixes so far into core-next, needed to test intel driver. Conflicts: drivers/gpu/drm/i915/intel_ringbuffer.c
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index ca3972f2c6f5..fc66af6a9448 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -287,7 +287,7 @@ static int init_ring_common(struct intel_ring_buffer *ring)
287 287
288 I915_WRITE_CTL(ring, 288 I915_WRITE_CTL(ring,
289 ((ring->size - PAGE_SIZE) & RING_NR_PAGES) 289 ((ring->size - PAGE_SIZE) & RING_NR_PAGES)
290 | RING_REPORT_64K | RING_VALID); 290 | RING_VALID);
291 291
292 /* If the head is still not zero, the ring is dead */ 292 /* If the head is still not zero, the ring is dead */
293 if ((I915_READ_CTL(ring) & RING_VALID) == 0 || 293 if ((I915_READ_CTL(ring) & RING_VALID) == 0 ||
@@ -1191,18 +1191,6 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
1191 struct drm_i915_private *dev_priv = dev->dev_private; 1191 struct drm_i915_private *dev_priv = dev->dev_private;
1192 unsigned long end; 1192 unsigned long end;
1193 int ret; 1193 int ret;
1194 u32 head;
1195
1196 /* If the reported head position has wrapped or hasn't advanced,
1197 * fallback to the slow and accurate path.
1198 */
1199 head = intel_read_status_page(ring, 4);
1200 if (head > ring->head) {
1201 ring->head = head;
1202 ring->space = ring_space(ring);
1203 if (ring->space >= n)
1204 return 0;
1205 }
1206 1194
1207 ret = intel_ring_wait_request(ring, n); 1195 ret = intel_ring_wait_request(ring, n);
1208 if (ret != -ENOSPC) 1196 if (ret != -ENOSPC)