Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [CI 01/32] drm/i915: Record the position of the start of the request
@ 2016-08-15  9:48 Chris Wilson
  2016-08-15  9:48 ` [CI 02/32] drm/i915: Reduce amount of duplicate buffer information captured on error Chris Wilson
                   ` (31 more replies)
  0 siblings, 32 replies; 33+ messages in thread
From: Chris Wilson @ 2016-08-15  9:48 UTC (permalink / raw)
  To: intel-gfx

Not only does it make for good documentation and debugging aide, but it is
also vital for when we want to unwind requests - such as when throwing away
an incomplete request.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1470414607-32453-2-git-send-email-arun.siluvery@linux.intel.com
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h         |  1 +
 drivers/gpu/drm/i915/i915_gem_request.c | 13 +++++++++----
 drivers/gpu/drm/i915/i915_gpu_error.c   |  6 ++++--
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index bf193ba1574e..b1017950087b 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -557,6 +557,7 @@ struct drm_i915_error_state {
 		struct drm_i915_error_request {
 			long jiffies;
 			u32 seqno;
+			u32 head;
 			u32 tail;
 		} *requests;
 
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index b764c1d440c8..8a9e9bfeea09 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -426,6 +426,13 @@ i915_gem_request_alloc(struct intel_engine_cs *engine,
 	if (ret)
 		goto err_ctx;
 
+	/* Record the position of the start of the request so that
+	 * should we detect the updated seqno part-way through the
+	 * GPU processing the request, we never over-estimate the
+	 * position of the head.
+	 */
+	req->head = req->ring->tail;
+
 	return req;
 
 err_ctx:
@@ -500,8 +507,6 @@ void __i915_add_request(struct drm_i915_gem_request *request, bool flush_caches)
 
 	trace_i915_gem_request_add(request);
 
-	request->head = request_start;
-
 	/* Seal the request and mark it as pending execution. Note that
 	 * we may inspect this state, without holding any locks, during
 	 * hangcheck. Hence we apply the barrier to ensure that we do not
@@ -514,10 +519,10 @@ void __i915_add_request(struct drm_i915_gem_request *request, bool flush_caches)
 	list_add_tail(&request->link, &engine->request_list);
 	list_add_tail(&request->ring_link, &ring->request_list);
 
-	/* Record the position of the start of the request so that
+	/* Record the position of the start of the breadcrumb so that
 	 * should we detect the updated seqno part-way through the
 	 * GPU processing the request, we never over-estimate the
-	 * position of the head.
+	 * position of the ring's HEAD.
 	 */
 	request->postfix = ring->tail;
 
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index eecb87063c88..d54848f5f246 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -455,9 +455,10 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
 				   dev_priv->engine[i].name,
 				   ee->num_requests);
 			for (j = 0; j < ee->num_requests; j++) {
-				err_printf(m, "  seqno 0x%08x, emitted %ld, tail 0x%08x\n",
+				err_printf(m, "  seqno 0x%08x, emitted %ld, head 0x%08x, tail 0x%08x\n",
 					   ee->requests[j].seqno,
 					   ee->requests[j].jiffies,
+					   ee->requests[j].head,
 					   ee->requests[j].tail);
 			}
 		}
@@ -1205,7 +1206,8 @@ static void i915_gem_record_rings(struct drm_i915_private *dev_priv,
 			erq = &ee->requests[count++];
 			erq->seqno = request->fence.seqno;
 			erq->jiffies = request->emitted_jiffies;
-			erq->tail = request->postfix;
+			erq->head = request->head;
+			erq->tail = request->tail;
 		}
 	}
 }
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-08-15 10:12 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-15  9:48 [CI 01/32] drm/i915: Record the position of the start of the request Chris Wilson
2016-08-15  9:48 ` [CI 02/32] drm/i915: Reduce amount of duplicate buffer information captured on error Chris Wilson
2016-08-15  9:48 ` [CI 03/32] drm/i915: Store the active context object on all engines upon error Chris Wilson
2016-08-15  9:48 ` [CI 04/32] drm/i915: Remove inactive/active list from debugfs Chris Wilson
2016-08-15  9:48 ` [CI 05/32] drm/i915: Focus debugfs/i915_gem_pinned to show only display pins Chris Wilson
2016-08-15  9:48 ` [CI 06/32] drm/i915: Reduce i915_gem_objects to only show object information Chris Wilson
2016-08-15  9:48 ` [CI 07/32] drm/i915: Remove redundant WARN_ON from __i915_add_request() Chris Wilson
2016-08-15  9:48 ` [CI 08/32] drm/i915: Always set the vma->pages Chris Wilson
2016-08-15  9:48 ` [CI 09/32] drm/i915: Create a VMA for an object Chris Wilson
2016-08-15  9:48 ` [CI 10/32] drm/i915: Add fetch_and_zero() macro Chris Wilson
2016-08-15  9:48 ` [CI 11/32] drm/i915: Add convenience wrappers for vma's object get/put Chris Wilson
2016-08-15  9:48 ` [CI 12/32] drm/i915: Track pinned vma inside guc Chris Wilson
2016-08-15  9:48 ` [CI 13/32] drm/i915: Convert fence computations to use vma directly Chris Wilson
2016-08-15  9:48 ` [CI 14/32] drm/i915: Use VMA directly for checking tiling parameters Chris Wilson
2016-08-15  9:48 ` [CI 15/32] drm/i915: Use VMA as the primary object for context state Chris Wilson
2016-08-15  9:48 ` [CI 16/32] drm/i915: Only change the context object's domain when binding Chris Wilson
2016-08-15  9:48 ` [CI 17/32] drm/i915: Move assertion for iomap access to i915_vma_pin_iomap Chris Wilson
2016-08-15  9:48 ` [CI 18/32] drm/i915: Use VMA for ringbuffer tracking Chris Wilson
2016-08-15  9:48 ` [CI 19/32] drm/i915: Use VMA for scratch page tracking Chris Wilson
2016-08-15  9:48 ` [CI 20/32] drm/i915: Move common scratch allocation/destroy to intel_engine_cs.c Chris Wilson
2016-08-15  9:49 ` [CI 21/32] drm/i915: Move common seqno reset " Chris Wilson
2016-08-15  9:49 ` [CI 22/32] drm/i915/overlay: Use VMA as the primary tracker for images Chris Wilson
2016-08-15  9:49 ` [CI 23/32] drm/i915: Use VMA as the primary tracker for semaphore page Chris Wilson
2016-08-15  9:49 ` [CI 24/32] drm/i915: Use VMA for render state page tracking Chris Wilson
2016-08-15  9:49 ` [CI 25/32] drm/i915: Use VMA for wa_ctx tracking Chris Wilson
2016-08-15  9:49 ` [CI 26/32] drm/i915: Consolidate i915_vma_unpin_and_release() Chris Wilson
2016-08-15  9:49 ` [CI 27/32] drm/i915: Track pinned VMA Chris Wilson
2016-08-15  9:49 ` [CI 28/32] drm/i915: Introduce i915_ggtt_offset() Chris Wilson
2016-08-15  9:49 ` [CI 29/32] drm/i915: Move debug only per-request pid tracking from request to ctx Chris Wilson
2016-08-15  9:49 ` [CI 30/32] drm/i915: Print the batchbuffer offset next to BBADDR in error state Chris Wilson
2016-08-15  9:49 ` [CI 31/32] drm/i915: Only record active and pending requests upon a GPU hang Chris Wilson
2016-08-15  9:49 ` [CI 32/32] drm/i915: Record the RING_MODE register for post-mortem debugging Chris Wilson
2016-08-15 10:12 ` ✗ Ro.CI.BAT: failure for series starting with [CI,01/32] drm/i915: Record the position of the start of the request Patchwork

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