From: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
To: "Harrison, John C" <john.c.harrison@intel.com>,
"Intel-GFX@Lists.FreeDesktop.Org"
<Intel-GFX@Lists.FreeDesktop.Org>
Cc: "Cheng, Michael" <michael.cheng@intel.com>,
"De Marchi, Lucas" <lucas.demarchi@intel.com>,
"DRI-Devel@Lists.FreeDesktop.Org"
<DRI-Devel@Lists.FreeDesktop.Org>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"Auld, Matthew" <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Fix missing ecodes
Date: Thu, 26 Jan 2023 19:17:53 +0000 [thread overview]
Message-ID: <a8fec1b746e540aa6ac275139b26a524488d6a0a.camel@intel.com> (raw)
In-Reply-To: <20230125004935.1986479-1-John.C.Harrison@Intel.com>
Firstly, thanks for catching this miss.
Since I only have one trivial nit and one non-blocker ask.
and the non-blocker ask will not impact the patch intent as it merely
tweaks an existing debug message, I believe we have an rb:
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
On Tue, 2023-01-24 at 16:49 -0800, Harrison, John C wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
>
> Error captures are tagged with an 'ecode'. This is a pseduo-unique magic
> number that is meant to distinguish similar seeming bugs with
> different underlying signatures. It is a combination of two ring state
> registers. Unfortunately, the register state being used is only valid
> in execlist mode. In GuC mode, the register state exists in a separate
> list of arbitrary register address/value pairs rather than the named
> entry structure. So, search through that list to find the two exciting
> registers and copy them over to the structure's named members.
>
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> Fixes: a6f0f9cf330a ("drm/i915/guc: Plumb GuC-capture into gpu_coredump")
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
> Cc: Michael Cheng <michael.cheng@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Bruce Chang <yu.bruce.chang@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> ---
> .../gpu/drm/i915/gt/uc/intel_guc_capture.c | 22 +++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> index 1c1b85073b4bd..4e0b06ceed96d 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> @@ -1571,6 +1571,27 @@ int intel_guc_capture_print_engine_node(struct drm_i915_error_state_buf *ebuf,
>
> #endif //CONFIG_DRM_I915_CAPTURE_ERROR
>
> +static void guc_capture_find_ecode(struct intel_engine_coredump *ee)
> +{
> + struct gcap_reg_list_info *reginfo;
> + struct guc_mmio_reg *regs;
> + i915_reg_t reg_ipehr = RING_IPEHR(0);
> + i915_reg_t reg_instdone = RING_INSTDONE(0);
> + int i;
> +
> + if (!ee->guc_capture_node)
> + return;
> +
> + reginfo = ee->guc_capture_node->reginfo + GUC_CAPTURE_LIST_TYPE_ENGINE_INSTANCE;
> + regs = reginfo->regs;
> + for (i = 0; i < reginfo->num_regs; i++) {
> + if (regs[i].offset == reg_ipehr.reg)
> + ee->ipehr = regs[i].value;
> + if (regs[i].offset == reg_instdone.reg)
nit: "else if"?
> + ee->instdone.instdone = regs[i].value;
> + }
> +}
> +
> void intel_guc_capture_free_node(struct intel_engine_coredump *ee)
> {
> if (!ee || !ee->guc_capture_node)
> @@ -1612,6 +1633,7 @@ void intel_guc_capture_get_matching_node(struct intel_gt *gt,
> list_del(&n->link);
> ee->guc_capture_node = n;
> ee->capture = guc->capture;
> + guc_capture_find_ecode(ee);
> return;
> }
> }
alan: only one non-blocker request:
while we are here, could we update the debug message when we can't find a matching captured node?
Current code:
drm_dbg(&i915->drm, "GuC capture can't match ee to node\n");
New suggestion:
drm_dbg(&i915->drm, "GuC capture can't find node for ee-ctx: lcra = 0x%08x | gucid = 0x%08x\n",
ce->lrc.lrca, ce->guc_id.id);
next prev parent reply other threads:[~2023-01-26 19:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 0:49 [Intel-gfx] [PATCH] drm/i915/guc: Fix missing ecodes John.C.Harrison
2023-01-25 2:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-01-25 8:06 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-01-26 19:17 ` Teres Alexis, Alan Previn [this message]
2023-01-28 2:28 ` [Intel-gfx] [PATCH] " John Harrison
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=a8fec1b746e540aa6ac275139b26a524488d6a0a.camel@intel.com \
--to=alan.previn.teres.alexis@intel.com \
--cc=DRI-Devel@Lists.FreeDesktop.Org \
--cc=Intel-GFX@Lists.FreeDesktop.Org \
--cc=john.c.harrison@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=matthew.auld@intel.com \
--cc=michael.cheng@intel.com \
--cc=rodrigo.vivi@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