From: Arisa Snowbell <arisa.snowbell@gmail.com>
To: intel-xe@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org,
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Arisa Snowbell <arisa.snowbell@gmail.com>
Subject: [PATCH 0/5] drm/xe: load the DG2 HuC through the GSC via mei_pxp
Date: Thu, 26 Nov 2026 21:57:52 +0100 [thread overview]
Message-ID: <20261126205758.49845-1-arisa.snowbell@gmail.com> (raw)
On DG2 the HuC is loaded and authenticated by the GSC, through the PXP
client on HECI1, so xe has never had a HuC there: VDEnc encode with bitrate
control (CBR/VBR, used by the media driver, QSV and anv's Vulkan Video)
does not work on DG2 under xe. This series adds the path i915 uses:
1. xe exposes HECI1 to mei as "xe.mei-gsc", with 4 MiB of VRAM as the
GSC extended operational memory and its interrupt routed.
2. mei-gsc binds it.
3. xe registers as the I915_COMPONENT_PXP component and, after every uC
load (probe, GT reset, resume) and when mei_pxp binds, asks the GSC
to load the HuC with PXP43 START_HUC_AUTH through gsc_command(). The
GSC hardware stays with mei.
4. As i915 does (i915_request_await_huc()), video decode jobs wait on a
fence of the pending load, and the HuC version query waits for it too
(interruptibly, at most 10 s), so userspace probing at init does not
see a HuC-less device. The uAPI doc says so.
5. The DG2 blob (i915/dg2_huc_gsc.bin) is selected; only this patch
changes behavior, so the series bisects.
If mei_pxp is missing or does not bind within 10 s, the HuC stays unloaded
and later loads stop waiting for it until it binds, like i915's
INTEL_HUC_DELAYED_LOAD_ERROR. A failed setup leaves the HuC unloaded and
does not fail the probe.
I know the stance from issue 234 is that i915 is the driver for DG2 and
that xe does not plan to enable the HuC there. I'm sending this anyway
because DG2 runs well on xe otherwise and the HuC is the piece missing for
media on it; if it is still not wanted, I'd be glad to hear what would
make it acceptable. MR !361 on the xe GitLab tried the same and reviews
there asked for what this series does: media waiting for the load, the
GSC left to mei through mei_pxp, and suspend handled while a load is
pending.
Tested on an Arc Pro A40 (8086:56b1) with the same patches applied to
7.4-rc4 (the only conflict was an include line):
- boot: mei_pxp binds ~1 s after probe, HuC 7.10.16 authenticated,
huc_info RUNNING; h264_vaapi CBR 8 Mbit/s gives 7.95 Mbit/s
- GT reset (force_reset_sync): HuC stays RUNNING, CBR as before
- S3 suspend and resume: mei_pxp re-binds, HuC RUNNING, CBR as before
- runtime D3cold (the slot's ACPI power resource goes off), three times
in a row: the first encode after waking runs at CBR as before, HuC
RUNNING
- anv Vulkan Video and iHD (VA-API, oneVPL) encode with rate control
Each patch builds with W=1 on drm-xe-next; checkpatch --strict is clean
apart from the MAINTAINERS note for the new files.
Known limitation, the same as on i915: a GSC command that never returns
holds up a reset or suspend in the stop of the load worker until mei
resets; decode submissions do not wait on it past the 10 s deadline.
Copyright: I'm not from Intel and unsure how the header of the new files
should read. xe_huc_mei.c is adapted in large part from i915's
intel_huc.c and intel_pxp_huc.c, so it keeps "Copyright © 2016-2022 Intel
Corporation" and adds my own line; xe_huc_mei.h carries only mine. Please
tell me if it should be written differently.
Tools: the code and changelogs were written with an LLM coding assistant
(Claude) in a long interactive session, from i915's implementation, the
xe sources and my description of what to build, and reviewed by a second
LLM pass. I reviewed, tested and debugged everything on the hardware
above, and I'm responsible for it.
Arisa Snowbell (5):
drm/xe/heci: expose the DG2 HECI1 interface to mei
mei: gsc: bind the xe HECI1 device
drm/xe/huc: load the DG2 HuC through the GSC via mei_pxp
drm/xe: hold video decode work and HuC queries for a pending DG2 HuC
load
drm/xe/uc_fw: select the DG2 HuC blob for a load by the GSC
drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/regs/xe_gsc_regs.h | 1 +
drivers/gpu/drm/xe/regs/xe_guc_regs.h | 3 +
drivers/gpu/drm/xe/xe_exec.c | 13 +
drivers/gpu/drm/xe/xe_heci_gsc.c | 171 +++++---
drivers/gpu/drm/xe/xe_heci_gsc.h | 27 +-
drivers/gpu/drm/xe/xe_huc.c | 16 +-
drivers/gpu/drm/xe/xe_huc_mei.c | 569 ++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_huc_mei.h | 21 +
drivers/gpu/drm/xe/xe_huc_types.h | 57 +++
drivers/gpu/drm/xe/xe_irq.c | 2 +
drivers/gpu/drm/xe/xe_query.c | 5 +
drivers/gpu/drm/xe/xe_uc.c | 7 +
drivers/gpu/drm/xe/xe_uc_fw.c | 14 +-
drivers/misc/mei/gsc-me.c | 5 +
include/uapi/drm/xe_drm.h | 5 +
16 files changed, 859 insertions(+), 58 deletions(-)
create mode 100644 drivers/gpu/drm/xe/xe_huc_mei.c
create mode 100644 drivers/gpu/drm/xe/xe_huc_mei.h
base-commit: fc2a3dd1a3a2105f34e2f5c7a3e21f82fc0a0851
--
2.56.1
next reply other threads:[~2026-11-27 8:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 20:57 Arisa Snowbell [this message]
2026-11-26 20:57 ` [PATCH 1/5] drm/xe/heci: expose the DG2 HECI1 interface to mei Arisa Snowbell
2026-11-26 20:57 ` [PATCH 2/5] mei: gsc: bind the xe HECI1 device Arisa Snowbell
2026-11-26 20:57 ` [PATCH 3/5] drm/xe/huc: load the DG2 HuC through the GSC via mei_pxp Arisa Snowbell
2026-11-26 21:23 ` sashiko-bot
2026-12-02 1:38 ` Ceraolo Spurio, Daniele
2026-11-26 20:57 ` [PATCH 4/5] drm/xe: hold video decode work and HuC queries for a pending DG2 HuC load Arisa Snowbell
2026-11-26 21:12 ` sashiko-bot
2026-11-26 20:57 ` [PATCH 5/5] drm/xe/uc_fw: select the DG2 HuC blob for a load by the GSC Arisa Snowbell
2026-11-30 15:51 ` ✗ LGCI.VerificationFailed: failure for drm/xe: load the DG2 HuC through the GSC via mei_pxp 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=20261126205758.49845-1-arisa.snowbell@gmail.com \
--to=arisa.snowbell@gmail.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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.