From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 4/5] drm/xe/debugfs: Update xe_mocs_dump signature
Date: Mon, 29 Sep 2025 19:26:38 -0400 [thread overview]
Message-ID: <aNsVriSfnFP3jXL9@intel.com> (raw)
In-Reply-To: <20250923211613.193347-5-michal.wajdeczko@intel.com>
On Tue, Sep 23, 2025 at 11:16:12PM +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, move kernel-doc closer to the function definition,
> as suggested in the doc-guide.
>
> 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_mocs.c | 15 +++++++++++++--
> drivers/gpu/drm/xe/xe_mocs.h | 8 +-------
> 3 files changed, 15 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> index bcf234e74471..b0e6dafeeacc 100644
> --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> @@ -173,12 +173,6 @@ static int pat(struct xe_gt *gt, struct drm_printer *p)
> return 0;
> }
>
> -static int mocs(struct xe_gt *gt, struct drm_printer *p)
> -{
> - xe_mocs_dump(gt, p);
> - return 0;
> -}
> -
> static int rcs_default_lrc(struct xe_gt *gt, struct drm_printer *p)
> {
> xe_lrc_dump_default(p, gt, XE_ENGINE_CLASS_RENDER);
> @@ -237,7 +231,7 @@ static const struct drm_info_list vf_safe_debugfs_list[] = {
> /* everything else should be added here */
> static const struct drm_info_list pf_only_debugfs_list[] = {
> { "hw_engines", .show = xe_gt_debugfs_show_with_rpm, .data = hw_engines },
> - { "mocs", .show = xe_gt_debugfs_show_with_rpm, .data = mocs },
> + { "mocs", .show = xe_gt_debugfs_show_with_rpm, .data = xe_mocs_dump },
> { "pat", .show = xe_gt_debugfs_show_with_rpm, .data = pat },
> { "powergate_info", .show = xe_gt_debugfs_show_with_rpm, .data = xe_gt_idle_pg_print },
> { "steering", .show = xe_gt_debugfs_show_with_rpm, .data = steering },
> diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c
> index 0c737413fcb6..7b68c22ff7bb 100644
> --- a/drivers/gpu/drm/xe/xe_mocs.c
> +++ b/drivers/gpu/drm/xe/xe_mocs.c
> @@ -772,12 +772,20 @@ void xe_mocs_init(struct xe_gt *gt)
> init_l3cc_table(gt, &table);
> }
>
> -void xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p)
> +/**
> + * xe_mocs_dump() - Dump MOCS table.
> + * @gt: the &xe_gt with MOCS table
> + * @p: the &drm_printer to dump info to
> + *
> + * Return: 0 on success or a negative error code on failure.
> + */
> +int xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p)
> {
> struct xe_device *xe = gt_to_xe(gt);
> enum xe_force_wake_domains domain;
> struct xe_mocs_info table;
> unsigned int fw_ref, flags;
> + int err = 0;
>
> flags = get_mocs_settings(xe, &table);
>
> @@ -785,14 +793,17 @@ void xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p)
> xe_pm_runtime_get_noresume(xe);
> fw_ref = xe_force_wake_get(gt_to_fw(gt), domain);
>
> - if (!xe_force_wake_ref_has_domain(fw_ref, domain))
> + if (!xe_force_wake_ref_has_domain(fw_ref, domain)) {
> + err = -ETIMEDOUT;
> goto err_fw;
> + }
>
> table.ops->dump(&table, flags, gt, p);
>
> err_fw:
> xe_force_wake_put(gt_to_fw(gt), fw_ref);
> xe_pm_runtime_put(xe);
> + return err;
> }
>
> #if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
> diff --git a/drivers/gpu/drm/xe/xe_mocs.h b/drivers/gpu/drm/xe/xe_mocs.h
> index dc972ffd4d07..f00bbb269829 100644
> --- a/drivers/gpu/drm/xe/xe_mocs.h
> +++ b/drivers/gpu/drm/xe/xe_mocs.h
> @@ -11,12 +11,6 @@ struct xe_gt;
>
> void xe_mocs_init_early(struct xe_gt *gt);
> void xe_mocs_init(struct xe_gt *gt);
> -
> -/**
> - * xe_mocs_dump - Dump mocs table
> - * @gt: GT structure
> - * @p: Printer to dump info to
> - */
> -void xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p);
> +int xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p);
>
> #endif
> --
> 2.47.1
>
next prev parent reply other threads:[~2025-09-29 23:26 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
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 [this message]
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=aNsVriSfnFP3jXL9@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.