Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228675
b: refs/heads/master
c: 6aa5606
h: refs/heads/master
i:
  228673: 12ca1b2
  228671: b95ec6d
v: v3
  • Loading branch information
Chris Wilson committed Oct 29, 2010
1 parent 8478730 commit 69d3d14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4e0b29bf23687ac16dc476bd90cd4d8b0eacd5c
refs/heads/master: 6aa56062eaba67adfb247cded244fd877329588d
13 changes: 12 additions & 1 deletion trunk/drivers/gpu/drm/i915/intel_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static int init_ring_common(struct intel_ring_buffer *ring)

I915_WRITE_CTL(ring,
((ring->gem_object->size - PAGE_SIZE) & RING_NR_PAGES)
| RING_NO_REPORT | RING_VALID);
| RING_REPORT_64K | RING_VALID);

/* If the head is still not zero, the ring is dead */
if ((I915_READ_CTL(ring) & RING_VALID) == 0 ||
Expand Down Expand Up @@ -691,6 +691,17 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
struct drm_device *dev = ring->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
unsigned long end;
u32 head;

head = intel_read_status_page(ring, 4);
if (head) {
ring->head = head & HEAD_ADDR;
ring->space = ring->head - (ring->tail + 8);
if (ring->space < 0)
ring->space += ring->size;
if (ring->space >= n)
return 0;
}

trace_i915_ring_wait_begin (dev);
end = jiffies + 3 * HZ;
Expand Down

0 comments on commit 69d3d14

Please sign in to comment.