Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115696
b: refs/heads/master
c: d3a6d44
h: refs/heads/master
v: v3
  • Loading branch information
Keith Packard authored and Dave Airlie committed Oct 17, 2008
1 parent 929d913 commit e0486cc
Show file tree
Hide file tree
Showing 2 changed files with 11 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: ed4cb4142b242d8090d3811d5eb4abf6aa985bc8
refs/heads/master: d3a6d4467ca44833bcb4ba1893a7aeaae939e4d5
11 changes: 10 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ int i915_wait_ring(struct drm_device * dev, int n, const char *caller)
{
drm_i915_private_t *dev_priv = dev->dev_private;
drm_i915_ring_buffer_t *ring = &(dev_priv->ring);
u32 acthd_reg = IS_I965G(dev) ? ACTHD_I965 : ACTHD;
u32 last_acthd = I915_READ(acthd_reg);
u32 acthd;
u32 last_head = I915_READ(PRB0_HEAD) & HEAD_ADDR;
int i;

for (i = 0; i < 10000; i++) {
for (i = 0; i < 100000; i++) {
ring->head = I915_READ(PRB0_HEAD) & HEAD_ADDR;
acthd = I915_READ(acthd_reg);
ring->space = ring->head - (ring->tail + 8);
if (ring->space < 0)
ring->space += ring->Size;
Expand All @@ -55,8 +59,13 @@ int i915_wait_ring(struct drm_device * dev, int n, const char *caller)

if (ring->head != last_head)
i = 0;
if (acthd != last_acthd)
i = 0;

last_head = ring->head;
last_acthd = acthd;
msleep_interruptible(10);

}

return -EBUSY;
Expand Down

0 comments on commit e0486cc

Please sign in to comment.