Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345639
b: refs/heads/master
c: b5d1779
h: refs/heads/master
i:
  345637: b3d4c61
  345635: ce0718d
  345631: bb62c21
v: v3
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Nov 29, 2012
1 parent a86817d commit 782b419
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 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: 4f1ba0f83a6d4abd055cf75af43954b38df8dcaf
refs/heads/master: b5d177946a30b097fbd1e5afa7c11acdeeb6bad8
23 changes: 21 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2462,10 +2462,29 @@ i915_gem_object_unbind(struct drm_i915_gem_object *obj)

static int i915_ring_idle(struct intel_ring_buffer *ring)
{
if (list_empty(&ring->active_list))
u32 seqno;
int ret;

/* We need to add any requests required to flush the objects */
if (!list_empty(&ring->active_list)) {
seqno = list_entry(ring->active_list.prev,
struct drm_i915_gem_object,
ring_list)->last_read_seqno;

ret = i915_gem_check_olr(ring, seqno);
if (ret)
return ret;
}

/* Wait upon the last request to be completed */
if (list_empty(&ring->request_list))
return 0;

return i915_wait_seqno(ring, i915_gem_next_request_seqno(ring));
seqno = list_entry(ring->request_list.prev,
struct drm_i915_gem_request,
list)->seqno;

return i915_wait_seqno(ring, seqno);
}

int i915_gpu_idle(struct drm_device *dev)
Expand Down

0 comments on commit 782b419

Please sign in to comment.