Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231943
b: refs/heads/master
c: d7b9935
h: refs/heads/master
i:
  231941: 258a246
  231939: 3e6cbf1
  231935: 4a03a5f
v: v3
  • Loading branch information
Linus Torvalds committed Jan 21, 2011
1 parent 19aa5a7 commit 3f3f727
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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: b23fffd778c312b8fb258d342051fcbdf6712128
refs/heads/master: d7b9935a347ae954be907ea3d5eb4564ff124c53
5 changes: 3 additions & 2 deletions trunk/drivers/gpu/drm/i915/intel_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ static int intel_wrap_ring_buffer(struct intel_ring_buffer *ring)

int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
{
int reread = 0;
struct drm_device *dev = ring->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long end;
Expand All @@ -940,9 +941,8 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
* fallback to the slow and accurate path.
*/
head = intel_read_status_page(ring, 4);
if (head < ring->actual_head)
if (reread)
head = I915_READ_HEAD(ring);
ring->actual_head = head;
ring->head = head & HEAD_ADDR;
ring->space = ring->head - (ring->tail + 8);
if (ring->space < 0)
Expand All @@ -961,6 +961,7 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
msleep(1);
if (atomic_read(&dev_priv->mm.wedged))
return -EAGAIN;
reread = 1;
} while (!time_after(jiffies, end));
trace_i915_ring_wait_end (dev);
return -EBUSY;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/i915/intel_ringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ struct intel_ring_buffer {
struct drm_device *dev;
struct drm_i915_gem_object *obj;

u32 actual_head;
u32 head;
u32 tail;
int space;
Expand Down

0 comments on commit 3f3f727

Please sign in to comment.