Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221774
b: refs/heads/master
c: 08deebf
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson committed Nov 8, 2010
1 parent a8007af commit 64af988
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: b47b30ccdaad5f2fc39a1a65921bffd150574a91
refs/heads/master: 08deebf98783d3de553eed2c9b6b8dcc7e168567
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 @@ -177,7 +177,7 @@ static int init_ring_common(struct drm_device *dev,

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

head = I915_READ_HEAD(ring) & HEAD_ADDR;
/* If the head is still not zero, the ring is dead */
Expand Down Expand Up @@ -692,6 +692,17 @@ int intel_wait_ring_buffer(struct drm_device *dev,
{
unsigned long end;
drm_i915_private_t *dev_priv = dev->dev_private;
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 64af988

Please sign in to comment.