aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.c
diff options
context:
space:
mode:
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 1ab842c6032e..536191540b03 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -301,7 +301,7 @@ static int init_ring_common(struct intel_ring_buffer *ring)
301 301
302 I915_WRITE_CTL(ring, 302 I915_WRITE_CTL(ring,
303 ((ring->size - PAGE_SIZE) & RING_NR_PAGES) 303 ((ring->size - PAGE_SIZE) & RING_NR_PAGES)
304 | RING_REPORT_64K | RING_VALID); 304 | RING_VALID);
305 305
306 /* If the head is still not zero, the ring is dead */ 306 /* If the head is still not zero, the ring is dead */
307 if ((I915_READ_CTL(ring) & RING_VALID) == 0 || 307 if ((I915_READ_CTL(ring) & RING_VALID) == 0 ||
@@ -1132,18 +1132,6 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
1132 struct drm_device *dev = ring->dev; 1132 struct drm_device *dev = ring->dev;
1133 struct drm_i915_private *dev_priv = dev->dev_private; 1133 struct drm_i915_private *dev_priv = dev->dev_private;
1134 unsigned long end; 1134 unsigned long end;
1135 u32 head;
1136
1137 /* If the reported head position has wrapped or hasn't advanced,
1138 * fallback to the slow and accurate path.
1139 */
1140 head = intel_read_status_page(ring, 4);
1141 if (head > ring->head) {
1142 ring->head = head;
1143 ring->space = ring_space(ring);
1144 if (ring->space >= n)
1145 return 0;
1146 }
1147 1135
1148 trace_i915_ring_wait_begin(ring); 1136 trace_i915_ring_wait_begin(ring);
1149 if (drm_core_check_feature(dev, DRIVER_GEM)) 1137 if (drm_core_check_feature(dev, DRIVER_GEM))