All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 11/13] drm/i915: Store the active context object on all engines upon error
Date: Fri,  5 Aug 2016 10:06:02 +0100	[thread overview]
Message-ID: <1470387964-3363-12-git-send-email-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <1470387964-3363-1-git-send-email-chris@chris-wilson.co.uk>

With execlists, we have context objects everywhere, not just RCS. So
store them for post-mortem debugging.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 462262ffec79..abfbd99dae96 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1034,25 +1034,6 @@ static void error_record_engine_registers(struct drm_i915_error_state *error,
 	}
 }
 
-static void i915_gem_record_active_context(struct intel_engine_cs *engine,
-					   struct drm_i915_error_state *error,
-					   struct drm_i915_error_engine *ee)
-{
-	struct drm_i915_private *dev_priv = engine->i915;
-	struct i915_vma *vma;
-
-	/* Currently render ring is the only HW context user */
-	if (engine->id != RCS || !error->ccid)
-		return;
-
-	list_for_each_entry(vma, &dev_priv->ggtt.base.active_list, vm_link) {
-		if ((error->ccid & PAGE_MASK) == vma->node.start) {
-			ee->ctx = i915_error_object_create(dev_priv, vma);
-			break;
-		}
-	}
-}
-
 static void i915_gem_record_rings(struct drm_i915_private *dev_priv,
 				  struct drm_i915_error_state *error)
 {
@@ -1099,6 +1080,10 @@ static void i915_gem_record_rings(struct drm_i915_private *dev_priv,
 					i915_error_object_create(dev_priv,
 								 engine->scratch);
 
+			ee->ctx =
+				i915_error_object_create(dev_priv,
+							 request->ctx->engine[i].vma);
+
 			pid = request->ctx->pid;
 			if (pid) {
 				struct task_struct *task;
@@ -1129,8 +1114,6 @@ static void i915_gem_record_rings(struct drm_i915_private *dev_priv,
 		ee->wa_ctx =
 			i915_error_object_create(dev_priv, engine->wa_ctx.vma);
 
-		i915_gem_record_active_context(engine, error, ee);
-
 		count = 0;
 		list_for_each_entry(request, &engine->request_list, link)
 			count++;
-- 
2.8.1

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

  parent reply	other threads:[~2016-08-05  9:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  9:05 First class i915_vma Chris Wilson
2016-08-05  9:05 ` [PATCH 01/13] drm/i915: Reduce amount of duplicate buffer information captured on error Chris Wilson
2016-08-05  9:05 ` [PATCH 02/13] drm/i915: Stop the machine whilst capturing the GPU crash dump Chris Wilson
2016-08-05 18:50   ` Daniel Vetter
2016-08-05 19:01     ` Chris Wilson
2016-08-05 19:57       ` Daniel Vetter
2016-08-05  9:05 ` [PATCH 03/13] drm/i915: Scan GGTT active list for context object Chris Wilson
2016-08-05  9:05 ` [PATCH 04/13] drm/i915: Move setting of request->batch into its single callsite Chris Wilson
2016-08-05  9:05 ` [PATCH 05/13] drm/i915: Mark unmappable GGTT entries as PIN_HIGH Chris Wilson
2016-08-05  9:05 ` [PATCH 06/13] drm/i915: Track pinned vma inside guc Chris Wilson
2016-08-05  9:05 ` [PATCH 07/13] drm/i915: Track pinned VMA Chris Wilson
2016-08-05  9:05 ` [PATCH 08/13] drm/i915/overlay: Use VMA as the primary tracker for images Chris Wilson
2016-08-05  9:06 ` [PATCH 09/13] drm/i915: Print the batchbuffer offset next to BBADDR in error state Chris Wilson
2016-08-05  9:06 ` [PATCH 10/13] drm/i915: Move per-request pid from request to ctx Chris Wilson
2016-08-05  9:06 ` Chris Wilson [this message]
2016-08-05  9:06 ` [PATCH 12/13] drm/i915: Only record active and pending requests upon a GPU hang Chris Wilson
2016-08-05  9:06 ` [PATCH 13/13] drm/i915: Compress GPU objects in error state Chris Wilson
2016-08-05 18:56   ` Daniel Vetter
2016-08-05 19:15     ` Chris Wilson
2016-08-05 19:58       ` Daniel Vetter
2016-08-05  9:09 ` ✗ Ro.CI.BAT: failure for series starting with [01/13] drm/i915: Reduce amount of duplicate buffer information captured on error Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470387964-3363-12-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.