From: Arun Siluvery <arun.siluvery@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Subject: [PATCH v2 7/9] drm/i915/guc: Improve action error reporting
Date: Wed, 10 Feb 2016 15:50:08 +0000 [thread overview]
Message-ID: <1455119410-17283-8-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>
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_debugfs.c | 17 ++++++++++-------
drivers/gpu/drm/i915/i915_guc_submission.c | 20 ++++++++++++--------
drivers/gpu/drm/i915/intel_guc.h | 9 +++++++--
3 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index ec0c2a05e..2a326ad 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2495,19 +2495,22 @@ static int i915_guc_info(struct seq_file *m, void *data)
mutex_unlock(&dev->struct_mutex);
seq_printf(m, "GuC total action count: %llu\n", guc.action_count);
- seq_printf(m, "GuC action failure count: %u\n", guc.action_fail);
seq_printf(m, "GuC last action command: 0x%x\n", guc.action_cmd);
seq_printf(m, "GuC last action status: 0x%x\n", guc.action_status);
- seq_printf(m, "GuC last action error code: %d\n", guc.action_err);
+
+ seq_printf(m, "GuC action failure count: %u\n", guc.action_fail_count);
+ seq_printf(m, "GuC last failed action: 0x%x\n", guc.action_fail_cmd);
+ seq_printf(m, "GuC last failed status: 0x%x\n", guc.action_fail_status);
+ seq_printf(m, "GuC last error code: %d\n", guc.action_err);
seq_printf(m, "\nGuC submissions:\n");
for_each_ring(ring, dev_priv, i) {
- seq_printf(m, "\t%-24s: %10llu, last seqno 0x%08x\n",
- ring->name, guc.submissions[ring->guc_id],
- guc.last_seqno[ring->guc_id]);
- total += guc.submissions[ring->guc_id];
+ seq_printf(m, "\t%-24s: %10llu, last %-8s 0x%08x %9d\n",
+ ring->name, guc.submissions[i], "seqno",
+ guc.last_seqno[i], guc.last_seqno[i]);
+ total += guc.submissions[i];
}
- seq_printf(m, "\t%s: %llu\n", "Total", total);
+ seq_printf(m, "\t%s: %10llu\n", "Total regular", total);
seq_printf(m, "\nGuC execbuf client @ %p:\n", guc.execbuf_client);
i915_guc_client_info(m, dev_priv, &client);
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index d7543ef..8b0a34d 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -78,9 +78,8 @@ static inline bool host2guc_action_response(struct drm_i915_private *dev_priv,
static int host2guc_action(struct intel_guc *guc, u32 *data, u32 len)
{
struct drm_i915_private *dev_priv = guc_to_i915(guc);
- u32 status;
- int i;
- int ret;
+ u32 status, response;
+ int ret, i;
if (WARN_ON(len < 1 || len > 15))
return -EINVAL;
@@ -99,6 +98,8 @@ static int host2guc_action(struct intel_guc *guc, u32 *data, u32 len)
/* No HOST2GUC command should take longer than 10ms */
ret = wait_for_atomic(host2guc_action_response(dev_priv, &status), 10);
+ response = I915_READ(SOFT_SCRATCH(15));
+ dev_priv->guc.action_status = status;
if (status != GUC2HOST_STATUS_SUCCESS) {
/*
* Either the GuC explicitly returned an error (which
@@ -108,15 +109,15 @@ static int host2guc_action(struct intel_guc *guc, u32 *data, u32 len)
if (ret != -ETIMEDOUT)
ret = -EIO;
- DRM_ERROR("GUC: host2guc action 0x%X failed. ret=%d "
+ DRM_ERROR("GuC: host2guc action 0x%X failed. ret=%d "
"status=0x%08X response=0x%08X\n",
- data[0], ret, status,
- I915_READ(SOFT_SCRATCH(15)));
+ data[0], ret, status, response);
- dev_priv->guc.action_fail += 1;
+ dev_priv->guc.action_fail_count += 1;
+ dev_priv->guc.action_fail_cmd = data[0];
+ dev_priv->guc.action_fail_status = status;
dev_priv->guc.action_err = ret;
}
- dev_priv->guc.action_status = status;
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
@@ -589,6 +590,9 @@ int i915_guc_submit(struct i915_guc_client *client,
guc->submissions[engine_id] += 1;
guc->last_seqno[engine_id] = rq->seqno;
+ if (q_ret)
+ guc->failures[engine_id] += 1;
+
return q_ret;
}
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
index 73002e9..c3281e7 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -103,11 +103,16 @@ struct intel_guc {
uint64_t action_count; /* Total commands issued */
uint32_t action_cmd; /* Last command word */
uint32_t action_status; /* Last return status */
- uint32_t action_fail; /* Total number of failures */
- int32_t action_err; /* Last error code */
+ uint32_t action_fail_count; /* Total number of failures */
+ uint32_t action_fail_cmd; /* Last failed command */
+ uint32_t action_fail_status; /* Last bad return status */
+ int32_t action_err; /* Last (nonzero) error code */
+
+ /* Submission status & statistics */
uint64_t submissions[GUC_MAX_ENGINES_NUM];
uint32_t last_seqno[GUC_MAX_ENGINES_NUM];
+ uint32_t failures[I915_NUM_RINGS];
};
/* intel_guc_loader.c */
--
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 ` [PATCH v2 6/9] drm/i915/error: enhanced error capture of requests Arun Siluvery
2016-02-10 15:50 ` Arun Siluvery [this message]
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-8-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).