From: Arun Siluvery <arun.siluvery@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Subject: [PATCH v2 6/9] drm/i915/error: enhanced error capture of requests
Date: Wed, 10 Feb 2016 15:50:07 +0000 [thread overview]
Message-ID: <1455119410-17283-7-git-send-email-arun.siluvery@linux.intel.com> (raw)
In-Reply-To: <1455119410-17283-1-git-send-email-arun.siluvery@linux.intel.com>
From: Dave Gordon <david.s.gordon@intel.com>
Record a few more things about the requests outstanding at the time of
capture ...
For: VIZ-2021
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 6 +++++-
drivers/gpu/drm/i915/i915_gpu_error.c | 23 +++++++++++++++++------
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 549478f..ed991bf 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -564,8 +564,9 @@ struct drm_i915_error_state {
u64 ctx_desc;
struct drm_i915_error_object {
- int page_count;
u64 gtt_offset;
+ bool is_ppgtt;
+ int page_count;
u32 *pages[0];
} *req_ringbuffer, *hw_ringbuffer, *batchbuffer, *wa_batchbuffer, *ctx, *hws_page;
@@ -573,7 +574,10 @@ struct drm_i915_error_state {
u64 ctx_desc;
long jiffies;
u32 seqno;
+ u32 head;
u32 tail;
+ u32 submission_count;
+ u64 ringbuffer_gtt;
} *requests;
struct {
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index c599df6..03485ca 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -493,9 +493,11 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
err_printf(m, " (submitted by %s [%d])",
error->ring[i].comm,
error->ring[i].pid);
- err_printf(m, " --- gtt_offset = 0x%08x %08x\n",
+ err_printf(m, " --- %sgtt_offset = 0x%08x %08x; %d pages\n",
+ obj->is_ppgtt ? "pp" : "g",
upper_32_bits(obj->gtt_offset),
- lower_32_bits(obj->gtt_offset));
+ lower_32_bits(obj->gtt_offset),
+ obj->page_count);
print_error_obj(m, obj);
}
@@ -514,9 +516,13 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
for (j = 0; j < error->ring[i].num_requests; j++) {
struct drm_i915_error_request *erq;
erq = &error->ring[i].requests[j];
- err_printf(m, " seqno 0x%08x, tail 0x%08x, "
- "emitted %ld, ctx_desc 0x%08x_%08x\n",
- erq->seqno, erq->tail, erq->jiffies,
+ err_printf(m, " seqno 0x%08x, ringbuf 0x%llx "
+ "head 0x%08x tail 0x%08x, "
+ "emitted %ld, %d submissions, "
+ "ctx_desc 0x%08x_%08x\n",
+ erq->seqno, erq->ringbuffer_gtt,
+ erq->head, erq->tail,
+ erq->jiffies, erq->submission_count,
upper_32_bits(erq->ctx_desc),
lower_32_bits(erq->ctx_desc));
}
@@ -698,6 +704,8 @@ i915_error_object_create(struct drm_i915_private *dev_priv,
reloc_offset = dst->gtt_offset;
if (i915_is_ggtt(vm))
vma = i915_gem_obj_to_ggtt(src);
+ else
+ dst->is_ppgtt = true;
use_ggtt = (src->cache_level == I915_CACHE_NONE &&
vma && (vma->bound & GLOBAL_BIND) &&
reloc_offset + num_pages * PAGE_SIZE <= dev_priv->gtt.mappable_end);
@@ -1209,7 +1217,10 @@ static void i915_gem_record_rings(struct drm_device *dev,
erq->ctx_desc = intel_lr_context_descriptor(ctx, ring);
erq->jiffies = request->emitted_jiffies;
erq->seqno = request->seqno;
- erq->tail = request->postfix;
+ erq->tail = request->tail;
+ erq->head = request->head;
+ erq->submission_count = request->elsp_submitted;
+ erq->ringbuffer_gtt = i915_gem_obj_ggtt_offset(request->ringbuf->obj);
}
}
}
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-02-10 15:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 15:50 [PATCH v2 0/9] Capture more useful details in error state Arun Siluvery
2016-02-10 15:50 ` [PATCH v2 1/9] drm/i915/error: capture execlist state on error Arun Siluvery
2016-02-10 15:50 ` [PATCH v2 2/9] drm/i915/error: capture ringbuffer pointed to by START Arun Siluvery
2016-02-10 15:50 ` [PATCH v2 3/9] drm/i915/error: report ctx id & desc for each request in the queue Arun Siluvery
2016-02-10 15:50 ` [PATCH v2 4/9] drm/i915/error: improve CSB reporting Arun Siluvery
2016-02-10 15:50 ` [PATCH v2 5/9] drm/i915/error: capture errored context based on request context-id Arun Siluvery
2016-02-10 15:50 ` Arun Siluvery [this message]
2016-02-10 15:50 ` [PATCH v2 7/9] drm/i915/guc: Improve action error reporting Arun Siluvery
2016-02-10 15:50 ` [PATCH v2 8/9] drm/i915/error: add GuC state error capture & decode Arun Siluvery
2016-02-10 15:50 ` [PATCH v2 9/9] drm/i915/error: Capture WA ctx batch in error state Arun Siluvery
2016-02-26 14:53 ` Mika Kuoppala
2016-02-26 15:35 ` Chris Wilson
2016-02-26 16:06 ` [PATCH v3 " Arun Siluvery
2016-03-01 10:34 ` Tvrtko Ursulin
2016-02-15 13:52 ` ✗ Fi.CI.BAT: failure for Capture more useful details in error state (rev2) Patchwork
2016-02-26 16:27 ` ✗ Fi.CI.BAT: warning for Capture more useful details in error state (rev3) Patchwork
2016-02-26 17:01 ` ✗ Fi.CI.BAT: failure " Patchwork
2016-02-29 10:32 ` Arun Siluvery
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=1455119410-17283-7-git-send-email-arun.siluvery@linux.intel.com \
--to=arun.siluvery@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).