Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/5] drm/xe/debugfs: Update xe_wa_dump signature
Date: Mon, 29 Sep 2025 19:25:42 -0400	[thread overview]
Message-ID: <aNsVdts2V4SpaZWU@intel.com> (raw)
In-Reply-To: <20250923211613.193347-3-michal.wajdeczko@intel.com>

On Tue, Sep 23, 2025 at 11:16:10PM +0200, Michal Wajdeczko wrote:
> Our debugfs helper xe_gt_debugfs_show_with_rpm() expects print()
> functions to return int. New signature allows us to drop wrapper.
> 
> While around, print additional separation lines using puts() to
> avoid output with leading \n which might confuse some printers.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_gt_debugfs.c |  8 +-------
>  drivers/gpu/drm/xe/xe_wa.c         | 19 +++++++++++++++----
>  drivers/gpu/drm/xe/xe_wa.h         |  2 +-
>  3 files changed, 17 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> index 6694a38203d3..e6a7684d571a 100644
> --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> @@ -167,12 +167,6 @@ static int register_save_restore(struct xe_gt *gt, struct drm_printer *p)
>  	return 0;
>  }
>  
> -static int workarounds(struct xe_gt *gt, struct drm_printer *p)
> -{
> -	xe_wa_dump(gt, p);
> -	return 0;
> -}
> -
>  static int tunings(struct xe_gt *gt, struct drm_printer *p)
>  {
>  	xe_tuning_dump(gt, p);
> @@ -236,7 +230,7 @@ static const struct drm_info_list vf_safe_debugfs_list[] = {
>  	{ "topology", .show = xe_gt_debugfs_show_with_rpm, .data = xe_gt_topology_dump },
>  	{ "register-save-restore",
>  		.show = xe_gt_debugfs_show_with_rpm, .data = register_save_restore },
> -	{ "workarounds", .show = xe_gt_debugfs_show_with_rpm, .data = workarounds },
> +	{ "workarounds", .show = xe_gt_debugfs_show_with_rpm, .data = xe_wa_gt_dump },
>  	{ "tunings", .show = xe_gt_debugfs_show_with_rpm, .data = tunings },
>  	{ "default_lrc_rcs", .show = xe_gt_debugfs_show_with_rpm, .data = rcs_default_lrc },
>  	{ "default_lrc_ccs", .show = xe_gt_debugfs_show_with_rpm, .data = ccs_default_lrc },
> diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
> index cd03891654a1..c60159a13001 100644
> --- a/drivers/gpu/drm/xe/xe_wa.c
> +++ b/drivers/gpu/drm/xe/xe_wa.c
> @@ -1086,7 +1086,14 @@ void xe_wa_device_dump(struct xe_device *xe, struct drm_printer *p)
>  			drm_printf_indent(p, 1, "%s\n", device_oob_was[idx].name);
>  }
>  
> -void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p)
> +/**
> + * xe_wa_gt_dump() - Dump GT workarounds into a drm printer.
> + * @gt: the &xe_gt
> + * @p: the &drm_printer
> + *
> + * Return: always 0.
> + */
> +int xe_wa_gt_dump(struct xe_gt *gt, struct drm_printer *p)
>  {
>  	size_t idx;
>  
> @@ -1094,18 +1101,22 @@ void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p)
>  	for_each_set_bit(idx, gt->wa_active.gt, ARRAY_SIZE(gt_was))
>  		drm_printf_indent(p, 1, "%s\n", gt_was[idx].name);
>  
> -	drm_printf(p, "\nEngine Workarounds\n");
> +	drm_puts(p, "\n");
> +	drm_printf(p, "Engine Workarounds\n");
>  	for_each_set_bit(idx, gt->wa_active.engine, ARRAY_SIZE(engine_was))
>  		drm_printf_indent(p, 1, "%s\n", engine_was[idx].name);
>  
> -	drm_printf(p, "\nLRC Workarounds\n");
> +	drm_puts(p, "\n");
> +	drm_printf(p, "LRC Workarounds\n");
>  	for_each_set_bit(idx, gt->wa_active.lrc, ARRAY_SIZE(lrc_was))
>  		drm_printf_indent(p, 1, "%s\n", lrc_was[idx].name);
>  
> -	drm_printf(p, "\nOOB Workarounds\n");
> +	drm_puts(p, "\n");
> +	drm_printf(p, "OOB Workarounds\n");
>  	for_each_set_bit(idx, gt->wa_active.oob, ARRAY_SIZE(oob_was))
>  		if (oob_was[idx].name)
>  			drm_printf_indent(p, 1, "%s\n", oob_was[idx].name);
> +	return 0;
>  }
>  
>  /*
> diff --git a/drivers/gpu/drm/xe/xe_wa.h b/drivers/gpu/drm/xe/xe_wa.h
> index 6a869b2de643..8fd6a5af0910 100644
> --- a/drivers/gpu/drm/xe/xe_wa.h
> +++ b/drivers/gpu/drm/xe/xe_wa.h
> @@ -22,7 +22,7 @@ void xe_wa_process_engine(struct xe_hw_engine *hwe);
>  void xe_wa_process_lrc(struct xe_hw_engine *hwe);
>  void xe_wa_apply_tile_workarounds(struct xe_tile *tile);
>  void xe_wa_device_dump(struct xe_device *xe, struct drm_printer *p);
> -void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p);
> +int xe_wa_gt_dump(struct xe_gt *gt, struct drm_printer *p);
>  
>  /**
>   * XE_GT_WA - Out-of-band GT workarounds, to be queried and called as needed.
> -- 
> 2.47.1
> 

  reply	other threads:[~2025-09-29 23:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 21:16 [PATCH 0/5] drm/xe/debugfs: Avoid use of wrapper functions Michal Wajdeczko
2025-09-23 21:16 ` [PATCH 1/5] drm/xe/debugfs: Update xe_gt_topology_dump signature Michal Wajdeczko
2025-09-29 23:25   ` Rodrigo Vivi
2025-09-30  8:45   ` Jani Nikula
2025-09-30 10:17     ` Michal Wajdeczko
2025-09-30 11:43       ` Jani Nikula
2025-09-30 17:23         ` Raag Jadav
2025-09-30 17:46           ` Michal Wajdeczko
2025-10-01 15:35             ` Rodrigo Vivi
2025-09-23 21:16 ` [PATCH 2/5] drm/xe/debugfs: Update xe_wa_dump signature Michal Wajdeczko
2025-09-29 23:25   ` Rodrigo Vivi [this message]
2025-09-23 21:16 ` [PATCH 3/5] drm/xe/debugfs: Update xe_tuning_dump signature Michal Wajdeczko
2025-09-29 23:26   ` Rodrigo Vivi
2025-09-23 21:16 ` [PATCH 4/5] drm/xe/debugfs: Update xe_mocs_dump signature Michal Wajdeczko
2025-09-29 23:26   ` Rodrigo Vivi
2025-09-23 21:16 ` [PATCH 5/5] drm/xe/debugfs: Update xe_pat_dump signature Michal Wajdeczko
2025-09-29 23:27   ` Rodrigo Vivi
2025-09-23 21:23 ` ✓ CI.KUnit: success for drm/xe/debugfs: Avoid use of wrapper functions Patchwork
2025-09-23 22:22 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-24  2:07 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-30  8:15   ` Michal Wajdeczko

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=aNsVdts2V4SpaZWU@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@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