From: sashiko-bot@kernel.org
To: "Daniele Ceraolo Spurio" <daniele.ceraolospurio@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v3 4/6] drm/xe/uc: mark HuC and GSC as only available on the media GT
Date: Fri, 04 Dec 2026 19:58:56 +0000 [thread overview]
Message-ID: <sashiko-outbox-250585@kernel.org> (raw)
In-Reply-To: <20261204193456.1035581-12-daniele.ceraolospurio@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/xe: uc_fw_override() breaks primary GT filtering for
HuC/GSC overrides
--
commit a0239ef6ac8f953a8c6f268f7370c54daa00bf6c
Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
drm/xe/uc: mark HuC and GSC as only available on the media GT
This commit restricts the HuC and GSC firmware definitions on multi-GT
platforms to GT_TYPE_MEDIA and removes the early GT-type checks from
xe_gsc_init() and xe_huc_init().
> diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c
> index 8edb8cee3cbd8..f8ce76ca05759 100644
> --- a/drivers/gpu/drm/xe/xe_gsc.c
> +++ b/drivers/gpu/drm/xe/xe_gsc.c
> @@ -402,19 +402,12 @@ void xe_gsc_hwe_irq_handler(struct xe_hw_engine *hwe, u16 intr_vec)
> int xe_gsc_init(struct xe_gsc *gsc)
> {
> struct xe_gt *gt = gsc_to_gt(gsc);
> - struct xe_tile *tile = gt_to_tile(gt);
> int ret;
>
> gsc->fw.type = XE_UC_FW_TYPE_GSC;
> INIT_WORK(&gsc->work, gsc_work);
> spin_lock_init(&gsc->lock);
>
> - /* The GSC uC is only available on the media GT */
> - if (tile->media_gt && (gt != tile->media_gt)) {
> - xe_uc_fw_change_status(&gsc->fw, XE_UC_FIRMWARE_NOT_SUPPORTED);
> - return 0;
> - }
> -
> /*
> * Starting from BMG the GSC is no longer needed for MC6 entry, so the
> * only missing features if the FW is lacking would be the content
> diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c
> index c73e1acbd091b..dbd420fb46bd5 100644
> --- a/drivers/gpu/drm/xe/xe_huc.c
> +++ b/drivers/gpu/drm/xe/xe_huc.c
> @@ -70,17 +70,6 @@ int xe_huc_init(struct xe_huc *huc)
>
> huc->fw.type = XE_UC_FW_TYPE_HUC;
>
> - /*
> - * The HuC is only available on the media GT on most platforms. The
> - * exception to that rule are the old Xe1 platforms where there was
> - * no separate GT for media IP, so the HuC was part of the primary
> - * GT. Such platforms have graphics versions 12.55 and earlier.
> - */
> - if (!xe_gt_is_media_type(gt) && GRAPHICS_VERx100(xe) > 1255) {
> - xe_uc_fw_change_status(&huc->fw, XE_UC_FIRMWARE_NOT_SUPPORTED);
> - return 0;
> - }
> -
> ret = xe_uc_fw_init(&huc->fw);
> if (ret)
> goto out;
[Severity: High]
Does removing these checks break gsc_firmware_path and huc_firmware_path
overrides on platforms with a media GT?
In uc_fw_request(), uc_fw_override() runs unconditionally after
uc_fw_auto_select() and before XE_UC_FIRMWARE_NOT_SUPPORTED is set:
drivers/gpu/drm/xe/xe_uc_fw.c:uc_fw_request() {
...
uc_fw_auto_select(xe, uc_fw);
if (IS_SRIOV_VF(xe)) {
uc_fw_vf_override(uc_fw);
return 0;
}
uc_fw_override(uc_fw);
xe_uc_fw_change_status(uc_fw, uc_fw->path ?
XE_UC_FIRMWARE_SELECTED :
XE_UC_FIRMWARE_NOT_SUPPORTED);
...
}
When gsc_firmware_path is set on a multi-GT platform, uc_fw_override()
sets uc_fw->path on primary_gt despite GT_TYPE_MEDIA filtering.
xe_gsc_init() then calls xe_gsc_proxy_init() on primary_gt, and binding
mei_gsc_proxy locks the uninitialized media_gt->uc.gsc.proxy.mutex.
xe_gsc_init_post_hwconfig() then fails probe with -ENODEV because
primary_gt has no GSCCS engine, and devm unwind runs
xe_gsc_proxy_component_unbind() against the uninitialized media_gt.
With huc_firmware_path set, primary_gt marks HuC loadable, allocates
pinned BOs, and attempts HuC upload and authentication on a GT without
HuC hardware.
Checking the GT type in uc_fw_override() would keep primary_gt marked
XE_UC_FIRMWARE_NOT_SUPPORTED.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204193456.1035581-8-daniele.ceraolospurio@intel.com?part=4
next prev parent reply other threads:[~2026-12-04 19:59 UTC|newest]
Thread overview: 15+ 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 [this message]
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
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
2026-12-04 20:26 ` ✓ Xe.CI.BAT: " Patchwork
2026-12-05 19:39 ` ✗ Xe.CI.FULL: failure " 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-250585@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 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.