From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe/uc: Track uc firmware state changes
Date: Fri, 27 Mar 2026 13:27:20 -0700 [thread overview]
Message-ID: <acboKBsCwHzot/nY@gsse-cloud1.jf.intel.com> (raw)
In-Reply-To: <20260327202407.563-1-michal.wajdeczko@intel.com>
On Fri, Mar 27, 2026 at 09:24:06PM +0100, Michal Wajdeczko wrote:
> Under CONFIG_DRM_XE_DEBUG_GUC print debug messages with each uc
> firmware state transition to better visualize the changes.
>
> [drm:xe_uc_fw_change_status [xe]] Tile0: GT0: GuC UNINITIALIZED->SELECTED
> [drm:xe_uc_fw_change_status [xe]] Tile0: GT0: GuC SELECTED->AVAILABLE
> [drm:xe_uc_fw_change_status [xe]] Tile0: GT0: GuC AVAILABLE->LOADABLE
> [drm:xe_uc_fw_change_status [xe]] Tile0: GT0: GuC LOADABLE->TRANSFERRED
> [drm:xe_uc_fw_change_status [xe]] Tile0: GT0: GuC TRANSFERRED->RUNNING
>
Seeems useful.
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
> drivers/gpu/drm/xe/xe_uc_fw.c | 11 +++++++++++
> drivers/gpu/drm/xe/xe_uc_fw.h | 4 ++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
> index 42d290e8585a..b5a49ef9dafe 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c
> @@ -218,6 +218,17 @@ static struct xe_device *uc_fw_to_xe(struct xe_uc_fw *uc_fw)
> return gt_to_xe(uc_fw_to_gt(uc_fw));
> }
>
> +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG_GUC)
> +void xe_uc_fw_change_status(struct xe_uc_fw *uc_fw, enum xe_uc_fw_status status)
> +{
> + xe_gt_dbg(uc_fw_to_gt(uc_fw), "%s %s->%s\n",
> + xe_uc_fw_type_repr(uc_fw->type),
> + xe_uc_fw_status_repr(uc_fw->status),
> + xe_uc_fw_status_repr(status));
> + uc_fw->__status = status;
> +}
> +#endif
> +
> static void
> uc_fw_auto_select(struct xe_device *xe, struct xe_uc_fw *uc_fw)
> {
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.h b/drivers/gpu/drm/xe/xe_uc_fw.h
> index 6195e353f269..bb281b72a677 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.h
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.h
> @@ -25,11 +25,15 @@ static inline u32 xe_uc_fw_rsa_offset(struct xe_uc_fw *uc_fw)
> return sizeof(struct uc_css_header) + uc_fw->ucode_size + uc_fw->css_offset;
> }
>
> +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG_GUC)
> +void xe_uc_fw_change_status(struct xe_uc_fw *uc_fw, enum xe_uc_fw_status status);
> +#else
> static inline void xe_uc_fw_change_status(struct xe_uc_fw *uc_fw,
> enum xe_uc_fw_status status)
> {
> uc_fw->__status = status;
> }
> +#endif
>
> static inline
> const char *xe_uc_fw_status_repr(enum xe_uc_fw_status status)
> --
> 2.47.1
>
next prev parent reply other threads:[~2026-03-27 20:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 20:24 [PATCH] drm/xe/uc: Track uc firmware state changes Michal Wajdeczko
2026-03-27 20:27 ` Matthew Brost [this message]
2026-03-27 20:31 ` ✓ CI.KUnit: success for " Patchwork
2026-03-27 21:16 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-28 13:23 ` ✓ Xe.CI.FULL: " Patchwork
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=acboKBsCwHzot/nY@gsse-cloud1.jf.intel.com \
--to=matthew.brost@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