Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Harrison <john.c.harrison@intel.com>
To: Badal Nilawar <badal.nilawar@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>
Subject: Re: [CI 12/12] [For CI] Debug prints/logs to debug G2H timeout issue
Date: Mon, 23 Sep 2024 10:09:49 -0700	[thread overview]
Message-ID: <2b123a01-0680-4915-82e8-16312c0403f8@intel.com> (raw)
In-Reply-To: <20240920142922.618649-13-badal.nilawar@intel.com>

On 9/20/2024 07:29, Badal Nilawar wrote:
> From: bnilawar <badal.nilawar@intel.com>
>
> Debug print and GuC log in dmesg to debug possible G2H irq delay / miss
>
> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_guc.c    | 4 +++-
>   drivers/gpu/drm/xe/xe_guc_ct.c | 2 ++
>   2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 41ff4fe65f8b..00c0550fb80f 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -1094,8 +1094,10 @@ int xe_guc_self_cfg64(struct xe_guc *guc, u16 key, u64 val)
>   
>   void xe_guc_irq_handler(struct xe_guc *guc, const u16 iir)
>   {
> -	if (iir & GUC_INTR_GUC2HOST)
> +	if (iir & GUC_INTR_GUC2HOST) {
> +		xe_gt_dbg(guc_to_gt(guc), "G2H IRQ GT[%d]\n", guc_to_gt(guc)->info.id);
>   		xe_guc_ct_irq_handler(&guc->ct);
> +	}
>   }
>   
>   void xe_guc_sanitize(struct xe_guc *guc)
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index 5546d4f87ebb..8f2d046bf1b5 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -1026,6 +1026,7 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
>   		xe_gt_err(gt, "Timed out wait for G2H, fence %u, action %04x",
>   			  g2h_fence.seqno, action[0]);
>   		xa_erase_irq(&ct->fence_lookup, g2h_fence.seqno);
> +		xe_guc_log_print_dmesg(&ct_to_guc(ct)->log);
>   		return -ETIME;
>   	}
>   
> @@ -1141,6 +1142,7 @@ static int parse_g2h_response(struct xe_guc_ct *ct, u32 *msg, u32 len)
>   		xe_gt_warn(gt, "G2H fence (%u) not found!\n", fence);
>   		CT_DEAD(ct, NULL, PARSE_G2H_UNKNOWN);
>   		g2h_release_space(ct, GUC_CTB_HXG_MSG_MAX_LEN);
> +		xe_guc_log_print_dmesg(&ct_to_guc(ct)->log);
The whole point of the CT_DEAD two lines above is to print the GuC log 
and a whole bunch of other useful stuff to dmesg (including things like 
the CT contents which could be helpful given the description of the 
issue you are investigating). Adding an extra GuC log print on top is 
just duplicating the spew.

Likewise, it might be better to add a new CT_DEAD line instead of a call 
to xe_guc_log_print_dmesg() in guc_ct_send_recv() above.

John.

>   		return -EPROTO;
>   	}
>   


  reply	other threads:[~2024-09-23 17:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20 14:29 [CI 00/12] Debug g2h timeout issue Badal Nilawar
2024-09-20 14:29 ` [CI 01/12] drm/xe/guc: Remove spurious line feed in debug print Badal Nilawar
2024-09-20 14:29 ` [CI 02/12] drm/xe/devcoredump: Use drm_puts and already cached local variables Badal Nilawar
2024-09-20 14:29 ` [CI 03/12] drm/xe/devcoredump: Improve section headings and add tile info Badal Nilawar
2024-09-20 14:29 ` [CI 04/12] drm/xe/devcoredump: Add ASCII85 dump helper function Badal Nilawar
2024-09-20 14:29 ` [CI 05/12] drm/xe/guc: Copy GuC log prior to dumping Badal Nilawar
2024-09-20 14:29 ` [CI 06/12] drm/xe/guc: Use a two stage dump for GuC logs and add more info Badal Nilawar
2024-09-20 14:29 ` [CI 07/12] drm/print: Introduce drm_line_printer Badal Nilawar
2024-09-20 14:29 ` [CI 08/12] drm/xe/guc: Dead CT helper Badal Nilawar
2024-09-20 14:29 ` [CI 09/12] drm/xe/guc: Dump entire CTB on errors Badal Nilawar
2024-09-20 14:29 ` [CI 10/12] drm/xe/guc: Add GuC log to devcoredump captures Badal Nilawar
2024-09-20 14:29 ` [CI 11/12] drm/xe/guc: Add a helper function for dumping GuC log to dmesg Badal Nilawar
2024-09-20 14:29 ` [CI 12/12] [For CI] Debug prints/logs to debug G2H timeout issue Badal Nilawar
2024-09-23 17:09   ` John Harrison [this message]
2024-09-20 14:48 ` [CI 00/12] Debug g2h " Jani Nikula
2024-09-23 19:45   ` John Harrison
2024-09-26 18:55     ` Rodrigo Vivi
2024-09-27 17:50       ` Nilawar, Badal
2024-09-20 15:24 ` ✓ CI.Patch_applied: success for " Patchwork
2024-09-20 15:24 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-20 15:25 ` ✓ CI.KUnit: success " Patchwork
2024-09-20 15:37 ` ✓ CI.Build: " Patchwork
2024-09-20 15:39 ` ✓ CI.Hooks: " Patchwork
2024-09-20 15:41 ` ✗ CI.checksparse: warning " Patchwork
2024-09-20 16:10 ` ✓ CI.BAT: success " Patchwork
2024-09-20 21:21 ` ✓ CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-09-20 14:06 [[CI] 00/12] " bnilawar
2024-09-20 14:06 ` [[CI] 12/12] [For CI] Debug prints/logs to debug G2H " bnilawar

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=2b123a01-0680-4915-82e8-16312c0403f8@intel.com \
    --to=john.c.harrison@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /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