From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/xe/huc: Adjust HuC check on primary GT
Date: Mon, 22 Sep 2025 07:39:12 -0700 [thread overview]
Message-ID: <2cb7594c-7280-4bc4-88dc-d8966f6fec09@intel.com> (raw)
In-Reply-To: <20250918211319.603324-5-matthew.d.roper@intel.com>
On 9/18/2025 2:13 PM, Matt Roper wrote:
> The HuC initialization code determines whether a platform can have a HuC
> on the primary GT by checking whether tile->media_gt is NULL; old Xe1
> platforms that combined render+media into a single GT will always have a
> NULL media_gt pointer. However once we allow media to be disabled via
> configfs, there will also be cases where tile->media_gt is NULL on more
> modern platforms, causing this condition to behave incorrectly.
>
> To handle cases where media gets disabled via configfs (or theoretical
> cases where media is truly fused off in hardware), change the condition
> to consider the graphics version of the primary GT; only the old Xe1
> platforms with graphics versions 12.55 or earlier should try to
> initialize a HuC on the primary GT.
>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/xe/xe_huc.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c
> index 7e43b2dd6a32..0a70c8924582 100644
> --- a/drivers/gpu/drm/xe/xe_huc.c
> +++ b/drivers/gpu/drm/xe/xe_huc.c
> @@ -66,14 +66,18 @@ static int huc_alloc_gsc_pkt(struct xe_huc *huc)
> int xe_huc_init(struct xe_huc *huc)
> {
> struct xe_gt *gt = huc_to_gt(huc);
> - struct xe_tile *tile = gt_to_tile(gt);
> struct xe_device *xe = gt_to_xe(gt);
> int ret;
>
> huc->fw.type = XE_UC_FW_TYPE_HUC;
>
> - /* On platforms with a media GT the HuC is only available there */
> - if (tile->media_gt && (gt != tile->media_gt)) {
> + /*
> + * 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) {
Since we can now match a FW definition to a specific GT in the FW table,
we could change the HuC FW defs for MTL+ from GT_TYPE_ANY to
GT_TYPE_MEDIA and just remove this check here entirely. Just a thought,
not a blocker.
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Daniele
> xe_uc_fw_change_status(&huc->fw, XE_UC_FIRMWARE_NOT_SUPPORTED);
> return 0;
> }
next prev parent reply other threads:[~2025-09-22 14:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 21:13 [PATCH 0/2] Allow configfs to disable specific GT type(s) Matt Roper
2025-09-18 21:13 ` [PATCH 1/2] drm/xe/huc: Adjust HuC check on primary GT Matt Roper
2025-09-19 9:32 ` Upadhyay, Tejas
2025-09-22 14:39 ` Daniele Ceraolo Spurio [this message]
2025-09-18 21:13 ` [PATCH 2/2] drm/xe/configfs: Add attribute to disable GT types Matt Roper
2025-09-22 18:24 ` Gustavo Sousa
2025-09-24 2:36 ` Matthew Brost
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=2cb7594c-7280-4bc4-88dc-d8966f6fec09@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@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