summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Gordon <david.s.gordon@intel.com>2015-10-23 19:46:24 +0100
committerJohn Harrison <John.C.Harrison@Intel.com>2016-06-28 17:19:18 +0100
commitb6bdbce9a73c3bcbd4230375960e98591a0a1a5e (patch)
treecdeab4b6734f9966b89d2a3a5a533d1484264b11
parent0ef15fd7e806ad1884d0371a83cd3c610da91781 (diff)
drm/i915/error: enhanced error capture of requests
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>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h6
-rw-r--r--drivers/gpu/drm/i915/i915_gpu_error.c21
2 files changed, 21 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 4d6dc8d913ea..89ad2b203e0a 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -534,8 +534,9 @@ struct drm_i915_error_state {
struct intel_ringbuffer req_ring;
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;
@@ -546,7 +547,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 bdb91b251bff..23ccac54e463 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -493,7 +493,8 @@ 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; %d pages\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),
obj->page_count);
@@ -517,9 +518,13 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
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));
}
@@ -739,6 +744,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->ggtt.mappable_end);
@@ -1260,7 +1267,11 @@ static void i915_gem_record_rings(struct drm_device *dev,
erq->ctx_desc = intel_lr_context_descriptor(ctx, engine);
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);
}
}
}