summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Gordon <david.s.gordon@intel.com>2015-10-23 20:03:16 +0100
committerJohn Harrison <John.C.Harrison@Intel.com>2016-06-28 17:19:20 +0100
commit7794fa844ec642d47cc7a064da385b3b7794f088 (patch)
tree35290ae72fa20fdca21ae7bf0f12cee6529798fa
parent80737b4289e4b78f2dd19e556a778746b07cbd6a (diff)
drm/i915/sched: include scheduler state in error capture
For: VIZ-2021 Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h1
-rw-r--r--drivers/gpu/drm/i915/i915_gpu_error.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index ff9afa726072..658825ddd5be 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -551,6 +551,7 @@ struct drm_i915_error_state {
u32 tail;
u32 submission_count;
u64 ringbuffer_gtt;
+ char scheduler_state;
} *requests;
struct {
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 8273f73d5f78..89051700aea7 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -619,10 +619,12 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
err_printf(m, " seqno 0x%08x, ringbuf 0x%llx "
"head 0x%08x tail 0x%08x, "
"emitted %ld, %d submissions, "
+ "sched %c "
"ctx_desc 0x%08x_%08x\n",
erq->seqno, erq->ringbuffer_gtt,
erq->head, erq->tail,
erq->jiffies, erq->submission_count,
+ erq->scheduler_state,
upper_32_bits(erq->ctx_desc),
lower_32_bits(erq->ctx_desc));
}
@@ -1339,6 +1341,8 @@ static void i915_gem_record_rings(struct drm_device *dev,
count = 0;
list_for_each_entry(request, &engine->request_list, list) {
+ struct i915_scheduler_queue_entry *sqe =
+ request->scheduler_qe;
struct intel_context *ctx = request->ctx;
struct drm_i915_error_request *erq;
@@ -1370,6 +1374,8 @@ static void i915_gem_record_rings(struct drm_device *dev,
erq->submission_count = request->elsp_submitted;
erq->ringbuffer_gtt =
i915_gem_obj_ggtt_offset(request->ringbuf->obj);
+ erq->scheduler_state = !sqe ? 'u' :
+ i915_scheduler_queue_status_chr(sqe->status);
}
}
}