All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/37] drm/i915: Record the position of the start of the request
@ 2016-08-12  6:53 Chris Wilson
  2016-08-12  6:53 ` [PATCH 02/37] drm/i915: Reduce amount of duplicate buffer information captured on error Chris Wilson
                   ` (37 more replies)
  0 siblings, 38 replies; 59+ messages in thread
From: Chris Wilson @ 2016-08-12  6:53 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
---
 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 7971c76852df..1eda64d5100f 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..c9e1246ecd36 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] 59+ messages in thread

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

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

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.