Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Daniele Ceraolo Spurio" <daniele.ceraolospurio@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v3 5/6] drm/xe/uc: Support fetching different FW files per-subplatform
Date: Fri, 04 Dec 2026 19:56:40 +0000	[thread overview]
Message-ID: <sashiko-outbox-250577@kernel.org> (raw)
In-Reply-To: <20261204193456.1035581-13-daniele.ceraolospurio@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/xe/uc: modparam firmware overrides bypass media-GT filter
  for GSC and HuC
- [Low] drm/xe/uc: spurious fallback firmware notice for
  modparam-overridden paths
--

commit 27f0e65a8ceab7b5459f3e28d494c58aea0ce589
Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

drm/xe/uc: Support fetching different FW files per-subplatform

This commit adds subplatform matching to uc_fw_entry and uc_fw_auto_select(),
and updates the GSC firmware table to use a dedicated XE_GSC_FW_ENTRY macro
that takes a subplatform parameter.

> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
> index 2696e1fe0be0c..701e7709d330b 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c

[ ... ]

> @@ -184,10 +186,19 @@ struct fw_blobs_by_type {
>  #define XE_UC_FW_ENTRY(platform__, gt_type__, entry__)				\
>  	{									\
>  		.platform = XE_ ## platform__,					\
> +		.subplatform = XE_SUBPLATFORM_ANY,				\
>  		.gt_type = XE_ ## gt_type__,					\
>  		entry__,							\
>  	},
>  
> +#define XE_GSC_FW_ENTRY(platform__, subplatform__, entry__)			\
> +	{									\
> +		.platform = XE_ ## platform__,					\
> +		.subplatform = XE_ ## subplatform__,				\
> +		.gt_type = XE_GT_TYPE_MEDIA,					\
> +		entry__,							\
> +	},

[Severity: Medium]
Can setting gsc_firmware_path or huc_firmware_path bypass the
XE_GT_TYPE_MEDIA filter and select firmware on the primary GT?

Since commit "drm/xe/uc: mark HuC and GSC as only available on the media GT"
removed the GT-type guards in xe_gsc_init() and xe_huc_init(),
uc_fw_auto_select() is the only place excluding GSC and HuC from the primary
GT.

In uc_fw_request(), uc_fw_override() runs before the
XE_UC_FIRMWARE_NOT_SUPPORTED status check and sets uc_fw->path
unconditionally:

drivers/gpu/drm/xe/xe_uc_fw.c:uc_fw_request() {
	...
	uc_fw_auto_select(xe, uc_fw);
	...
	uc_fw_override(uc_fw);

	xe_uc_fw_change_status(uc_fw, uc_fw->path ?
			       XE_UC_FIRMWARE_SELECTED :
			       XE_UC_FIRMWARE_NOT_SUPPORTED);
	...
}

With a non-empty gsc_firmware_path on a platform with a separate media GT,
gsc->fw is marked available on the primary GT and xe_gsc_init_post_hwconfig()
aborts probe with -ENODEV because that GT has no XE_ENGINE_CLASS_OTHER
engine.

Similarly, huc_firmware_path marks HuC loadable on the primary GT and causes
xe_uc_load_hw() to call xe_huc_upload() on a GT without HuC hardware.

[ ... ]

> @@ -269,6 +280,10 @@ uc_fw_auto_select(struct xe_device *xe, struct xe_uc_fw *uc_fw)
>  		if (p != entries[i].platform)
>  			continue;
>  
> +		if (entries[i].subplatform != XE_SUBPLATFORM_ANY &&
> +		    entries[i].subplatform != xe->info.subplatform)
> +			continue;
> +
>  		if (entries[i].gt_type != XE_GT_TYPE_ANY &&
>  		    entries[i].gt_type != gt->info.type)
>  			continue;

[Severity: Low]
Does xe_uc_fw_check_version_requirements() log a spurious fallback notice
when guc_firmware_path or gsc_firmware_path is overridden?

uc_fw_auto_select() sets both uc_fw->path and uc_fw->wanted_path, and
uc_fw_override() later replaces uc_fw->path with the modparam string without
updating uc_fw->wanted_path.

In xe_uc_fw_check_version_requirements() (added in commit "drm/xe/uc: Add FW
file fallback support"), the uc_fw->wanted_path != uc_fw->path check does not
guard on !xe_uc_fw_is_overridden(uc_fw), so any GuC or GSC modparam override
emits misleading fallback and linux-firmware update messages.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204193456.1035581-8-daniele.ceraolospurio@intel.com?part=5

  reply	other threads:[~2026-12-04 19:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 19:34 [PATCH v3 0/6] Add support for WCL GSC FW Daniele Ceraolo Spurio
2026-12-04 19:34 ` [PATCH v3 1/6] drm/xe/pxp: Fix PTL GSC version check for PXP support Daniele Ceraolo Spurio
2026-12-04 19:34 ` [PATCH v3 2/6] drm/xe: Define WCL as a PTL subplatform Daniele Ceraolo Spurio
2026-12-04 19:53   ` sashiko-bot
2026-12-04 19:35 ` [PATCH v3 3/6] drm/xe/uc: Add FW file fallback support Daniele Ceraolo Spurio
2026-12-04 19:59   ` sashiko-bot
2026-12-04 19:35 ` [PATCH v3 4/6] drm/xe/uc: mark HuC and GSC as only available on the media GT Daniele Ceraolo Spurio
2026-12-04 19:58   ` sashiko-bot
2026-12-04 19:35 ` [PATCH v3 5/6] drm/xe/uc: Support fetching different FW files per-subplatform Daniele Ceraolo Spurio
2026-12-04 19:56   ` sashiko-bot [this message]
2026-12-04 19:35 ` [PATCH v3 6/6] drm/xe/gsc: define GSC for WCL Daniele Ceraolo Spurio
2026-12-04 19:49 ` ✗ CI.checkpatch: warning for Add support for WCL GSC FW Patchwork
2026-12-04 19:51 ` ✓ CI.KUnit: success " 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=sashiko-outbox-250577@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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