public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] seqno
@ 2012-05-03 11:35 Chris Wilson
  2012-05-03 11:35 ` [PATCH 2/2] drm/i915: Avoid concurrent access when marking the device as idle/busy Chris Wilson
  2012-05-03 11:36 ` [PATCH 1/2] seqno Chris Wilson
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2012-05-03 11:35 UTC (permalink / raw)
  To: intel-gfx

---
 drivers/gpu/drm/i915/i915_gem.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1fadb02..4f270e8 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3599,6 +3599,8 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
 	 */
 	args->busy = obj->active;
 	if (args->busy) {
+		u32 seqno;
+
 		/* Unconditionally flush objects, even when the gpu still uses this
 		 * object. Userspace calling this function indicates that it wants to
 		 * use this buffer rather sooner than later, so issuing the required
@@ -3617,7 +3619,10 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
 		 * timer or when irqs are actually unmasked, and our
 		 * working set ends up being larger than required.
 		 */
-		i915_gem_retire_requests_ring(obj->ring, 0);
+		seqno = obj->last_rendering_seqno;
+		if (!i915_seqno_passed(obj->ring->last_seqno, seqno))
+			seqno = 0;
+		i915_gem_retire_requests_ring(obj->ring, seqno);
 		args->busy = obj->active;
 	}
 
-- 
1.7.10

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 11:35 [PATCH 1/2] seqno Chris Wilson
2012-05-03 11:35 ` [PATCH 2/2] drm/i915: Avoid concurrent access when marking the device as idle/busy Chris Wilson
2012-05-03 11:36 ` [PATCH 1/2] seqno Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox