All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Simplify flushing activity on the ring
@ 2012-11-27 10:34 Chris Wilson
  2012-11-27 10:34 ` [PATCH 2/2] drm/i915: Rearrange code to only have a single method for waiting upon " Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2012-11-27 10:34 UTC (permalink / raw)
  To: intel-gfx

As we now always preallocate the seqno before writing to the ring, we
can trivially test if we have any pending activity on the ring by
inspecting the olr. This makes it then possible to flush operations that
are not normally associated with a request, like power-management.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3b9b250..e594435 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2485,13 +2485,9 @@ static int i915_ring_idle(struct intel_ring_buffer *ring)
 	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);
+	/* We need to add any requests required to flush the objects and ring */
+	if (ring->outstanding_lazy_request) {
+		ret = i915_add_request(ring, NULL, NULL);
 		if (ret)
 			return ret;
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-27 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 10:34 [PATCH 1/2] drm/i915: Simplify flushing activity on the ring Chris Wilson
2012-11-27 10:34 ` [PATCH 2/2] drm/i915: Rearrange code to only have a single method for waiting upon " Chris Wilson
2012-11-27 14:36   ` Mika Kuoppala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.