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: "DRI-Devel@Lists.FreeDesktop.Org" <DRI-Devel@Lists.FreeDesktop.Org>
Subject: Re: [Intel-gfx] [PATCH 7/7] drm/i915/guc: Reduce spam from error capture
Date: Tue, 2 Aug 2022 18:54:17 +0000 [thread overview]
Message-ID: <32398759c5c0e5113b7363128918758b45ff6075.camel@intel.com> (raw)
In-Reply-To: <20220728022028.2190627-8-John.C.Harrison@Intel.com>
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
On Wed, 2022-07-27 at 19:20 -0700, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
>
> Some debug code got left in when the GuC based register save for error
> capture was added. Remove that.
>
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> ---
> .../gpu/drm/i915/gt/uc/intel_guc_capture.c | 67 ++++++++-----------
> 1 file changed, 28 insertions(+), 39 deletions(-)
>
> 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 d2ac53d4f3b6e..8f11651460131 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> @@ -1383,33 +1383,22 @@ guc_capture_reg_to_str(const struct intel_guc *guc, u32 owner, u32 type,
> return NULL;
> }
>
> -#ifdef CONFIG_DRM_I915_DEBUG_GUC
> -#define __out(a, ...) \
> - do { \
> - drm_warn((&(a)->i915->drm), __VA_ARGS__); \
> - i915_error_printf((a), __VA_ARGS__); \
> - } while (0)
> -#else
> -#define __out(a, ...) \
> - i915_error_printf(a, __VA_ARGS__)
> -#endif
> -
> #define GCAP_PRINT_INTEL_ENG_INFO(ebuf, eng) \
> do { \
> - __out(ebuf, " i915-Eng-Name: %s command stream\n", \
> - (eng)->name); \
> - __out(ebuf, " i915-Eng-Inst-Class: 0x%02x\n", (eng)->class); \
> - __out(ebuf, " i915-Eng-Inst-Id: 0x%02x\n", (eng)->instance); \
> - __out(ebuf, " i915-Eng-LogicalMask: 0x%08x\n", \
> - (eng)->logical_mask); \
> + i915_error_printf(ebuf, " i915-Eng-Name: %s command stream\n", \
> + (eng)->name); \
> + i915_error_printf(ebuf, " i915-Eng-Inst-Class: 0x%02x\n", (eng)->class); \
> + i915_error_printf(ebuf, " i915-Eng-Inst-Id: 0x%02x\n", (eng)->instance); \
> + i915_error_printf(ebuf, " i915-Eng-LogicalMask: 0x%08x\n", \
> + (eng)->logical_mask); \
> } while (0)
>
> #define GCAP_PRINT_GUC_INST_INFO(ebuf, node) \
> do { \
> - __out(ebuf, " GuC-Engine-Inst-Id: 0x%08x\n", \
> - (node)->eng_inst); \
> - __out(ebuf, " GuC-Context-Id: 0x%08x\n", (node)->guc_id); \
> - __out(ebuf, " LRCA: 0x%08x\n", (node)->lrca); \
> + i915_error_printf(ebuf, " GuC-Engine-Inst-Id: 0x%08x\n", \
> + (node)->eng_inst); \
> + i915_error_printf(ebuf, " GuC-Context-Id: 0x%08x\n", (node)->guc_id); \
> + i915_error_printf(ebuf, " LRCA: 0x%08x\n", (node)->lrca); \
> } while (0)
>
> int intel_guc_capture_print_engine_node(struct drm_i915_error_state_buf *ebuf,
> @@ -1441,57 +1430,57 @@ int intel_guc_capture_print_engine_node(struct drm_i915_error_state_buf *ebuf,
>
> guc = &ee->engine->gt->uc.guc;
>
> - __out(ebuf, "global --- GuC Error Capture on %s command stream:\n",
> - ee->engine->name);
> + i915_error_printf(ebuf, "global --- GuC Error Capture on %s command stream:\n",
> + ee->engine->name);
>
> node = ee->guc_capture_node;
> if (!node) {
> - __out(ebuf, " No matching ee-node\n");
> + i915_error_printf(ebuf, " No matching ee-node\n");
> return 0;
> }
>
> - __out(ebuf, "Coverage: %s\n", grptype[node->is_partial]);
> + i915_error_printf(ebuf, "Coverage: %s\n", grptype[node->is_partial]);
>
> for (i = GUC_CAPTURE_LIST_TYPE_GLOBAL; i < GUC_CAPTURE_LIST_TYPE_MAX; ++i) {
> - __out(ebuf, " RegListType: %s\n",
> - datatype[i % GUC_CAPTURE_LIST_TYPE_MAX]);
> - __out(ebuf, " Owner-Id: %d\n", node->reginfo[i].vfid);
> + i915_error_printf(ebuf, " RegListType: %s\n",
> + datatype[i % GUC_CAPTURE_LIST_TYPE_MAX]);
> + i915_error_printf(ebuf, " Owner-Id: %d\n", node->reginfo[i].vfid);
>
> switch (i) {
> case GUC_CAPTURE_LIST_TYPE_GLOBAL:
> default:
> break;
> case GUC_CAPTURE_LIST_TYPE_ENGINE_CLASS:
> - __out(ebuf, " GuC-Eng-Class: %d\n", node->eng_class);
> - __out(ebuf, " i915-Eng-Class: %d\n",
> - guc_class_to_engine_class(node->eng_class));
> + i915_error_printf(ebuf, " GuC-Eng-Class: %d\n", node->eng_class);
> + i915_error_printf(ebuf, " i915-Eng-Class: %d\n",
> + guc_class_to_engine_class(node->eng_class));
> break;
> case GUC_CAPTURE_LIST_TYPE_ENGINE_INSTANCE:
> eng = intel_guc_lookup_engine(guc, node->eng_class, node->eng_inst);
> if (eng)
> GCAP_PRINT_INTEL_ENG_INFO(ebuf, eng);
> else
> - __out(ebuf, " i915-Eng-Lookup Fail!\n");
> + i915_error_printf(ebuf, " i915-Eng-Lookup Fail!\n");
> GCAP_PRINT_GUC_INST_INFO(ebuf, node);
> break;
> }
>
> numregs = node->reginfo[i].num_regs;
> - __out(ebuf, " NumRegs: %d\n", numregs);
> + i915_error_printf(ebuf, " NumRegs: %d\n", numregs);
> j = 0;
> while (numregs--) {
> regs = node->reginfo[i].regs;
> str = guc_capture_reg_to_str(guc, GUC_CAPTURE_LIST_INDEX_PF, i,
> node->eng_class, 0, regs[j].offset, &is_ext);
> if (!str)
> - __out(ebuf, " REG-0x%08x", regs[j].offset);
> + i915_error_printf(ebuf, " REG-0x%08x", regs[j].offset);
> else
> - __out(ebuf, " %s", str);
> + i915_error_printf(ebuf, " %s", str);
> if (is_ext)
> - __out(ebuf, "[%ld][%ld]",
> - FIELD_GET(GUC_REGSET_STEERING_GROUP, regs[j].flags),
> - FIELD_GET(GUC_REGSET_STEERING_INSTANCE, regs[j].flags));
> - __out(ebuf, ": 0x%08x\n", regs[j].value);
> + i915_error_printf(ebuf, "[%ld][%ld]",
> + FIELD_GET(GUC_REGSET_STEERING_GROUP, regs[j].flags),
> + FIELD_GET(GUC_REGSET_STEERING_INSTANCE, regs[j].flags));
> + i915_error_printf(ebuf, ": 0x%08x\n", regs[j].value);
> ++j;
> }
> }
> --
> 2.37.1
>
prev parent reply other threads:[~2022-08-02 18:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 2:20 [PATCH 0/7] Fixes and improvements to GuC logging and error capture John.C.Harrison
2022-07-28 2:20 ` [PATCH 1/7] drm/i915/guc: Add a helper for log buffer size John.C.Harrison
2022-08-02 17:37 ` Teres Alexis, Alan Previn
2022-08-03 0:29 ` John Harrison
2022-07-28 2:20 ` [PATCH 2/7] drm/i915/guc: Fix capture size warning and bump the size John.C.Harrison
2022-08-02 17:46 ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-07-28 2:20 ` [PATCH 3/7] drm/i915/guc: Add GuC <-> kernel time stamp translation information John.C.Harrison
2022-08-05 0:40 ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-08-08 18:43 ` John Harrison
2022-08-15 4:55 ` Teres Alexis, Alan Previn
2022-08-19 10:45 ` Jani Nikula
2022-08-19 21:02 ` John Harrison
2022-08-23 10:09 ` Jani Nikula
2022-07-28 2:20 ` [PATCH 4/7] drm/i915/guc: Record CTB info in error logs John.C.Harrison
2022-08-02 18:27 ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-08-03 0:20 ` John Harrison
2022-07-28 2:20 ` [PATCH 5/7] drm/i915/guc: Use streaming loads to speed up dumping the guc log John.C.Harrison
2022-08-02 18:48 ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-08-03 0:14 ` John Harrison
2022-07-28 2:20 ` [PATCH 6/7] drm/i915/guc: Make GuC log sizes runtime configurable John.C.Harrison
2022-08-15 5:43 ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-08-24 9:01 ` Joonas Lahtinen
[not found] ` <4bd7b51a-caf0-d987-c7df-6cfb24f36597@intel.com>
2022-08-25 7:15 ` Joonas Lahtinen
2022-08-25 16:31 ` John Harrison
2022-08-26 6:23 ` Joonas Lahtinen
2022-09-12 7:12 ` Joonas Lahtinen
2022-09-12 23:46 ` John Harrison
2022-07-28 2:20 ` [PATCH 7/7] drm/i915/guc: Reduce spam from error capture John.C.Harrison
2022-08-02 18:54 ` Teres Alexis, Alan Previn [this message]
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=32398759c5c0e5113b7363128918758b45ff6075.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 \
/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).