drm/xe: add DG2 HuC GSC support and MEI integration
PATCH 1/1 drm/xe: add DG2 HuC GSC support and MEI integration
From: Seliverstov Daniil Denisovich <[email protected]>
This enables HuC firmware initialization and authentication on DG2 hardware when using the Xe DRM driver.
Changes include:
- add DG2 MEI GSC interface support
- add HuC firmware parsing for GSC BPDT/CPD layout
- improve HuC loading and authentication handling
- add GSC register definitions and firmware ABI updates
- add Xe MEI DG2 module support
- update Xe workarounds and engine handling for HuC/GSC
- update MEI GSC support for DG2
--- drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/regs/xe_gsc_regs.h | 1 + drivers/gpu/drm/xe/xe_gsc.c | 5 +- drivers/gpu/drm/xe/xe_heci_gsc.c | 212 ++++++++++++++++---------- drivers/gpu/drm/xe/xe_heci_gsc.h | 12 +- drivers/gpu/drm/xe/xe_huc.c | 66 ++++++++ drivers/gpu/drm/xe/xe_huc_types.h | 5 + drivers/gpu/drm/xe/xe_mei_dg2.c | 120 +++++++++++++++ drivers/gpu/drm/xe/xe_mei_dg2.h | 14 ++ drivers/gpu/drm/xe/xe_uc_fw.c | 44 +++++- drivers/gpu/drm/xe/xe_wa.c | 3 +- drivers/misc/mei/gsc-me.c | 5 + 12 files changed, 393 insertions(+), 95 deletions(-) create mode 100644 drivers/gpu/drm/xe/xe_mei_dg2.c create mode 100644 drivers/gpu/drm/xe/xe_mei_dg2.h
drivers/gpu/drm/xe/Makefile +1 -0
@@ -53,6 +53,7 @@ xe-y += xe_bb.o \ xe_gsc_debugfs.o \ xe_gsc_proxy.o \ xe_gsc_submit.o \ + xe_mei_dg2.o \ xe_gt.o \ xe_gt_ccs_mode.o \ xe_gt_clock.o \
drivers/gpu/drm/xe/regs/xe_gsc_regs.h +1 -0
@@ -20,6 +20,7 @@#define DG1_GSC_HECI2_BASE 0x00259000#define PVC_GSC_HECI2_BASE 0x00285000 +#define DG2_GSC_HECI1_BASE 0x00373000#define DG2_GSC_HECI2_BASE 0x00374000#define HECI_H_CSR (base) XE_REG((base) + 0x4)
drivers/gpu/drm/xe/xe_gsc.c +4 -1
@@ -467,8 +467,11 @@ int xe_gsc_init_post_hwconfig(struct xe_gsc *gsc)if (!xe_uc_fw_is_available (&gsc->fw))return 0 ; -if (!hwe) +if (!hwe) { +if (xe->info.platform ==XE_DG2 ) +return 0 ;return -ENODEV ; + } bo = xe_managed_bo_create_pin_map(xe, tile, SZ_4M, XE_BO_FLAG_STOLEN |
drivers/gpu/drm/xe/xe_heci_gsc.c +129 -83
314 lines not on this page · raw message
drivers/gpu/drm/xe/xe_heci_gsc.h +7 -5
@@ -9,6 +9,7 @@struct xe_device ;struct mei_aux_device ; +struct xe_bo ;/* * GSC HECI1 bit corresponds to bit15 and HECI2 to bit14.
@@ -24,13 +25,14 @@ struct mei_aux_device;/** * struct xe_heci_gsc - graphics security controller for xe, HECI interface * -* @adev : pointer to mei auxiliary device structure -* @irq : irq number -* +* @adev: array of pointers to mei auxiliary device structures +* @irq: array of irq numbers +* @gem_obj: array of pointers to allocated VRAM memory objects */ struct xe_heci_gsc { -struct mei_aux_device *adev; -int irq; +struct mei_aux_device *adev[2 ]; +int irq[2 ]; +struct xe_bo *gem_obj[2 ]; };int xe_heci_gsc_init (struct xe_device *xe);
drivers/gpu/drm/xe/xe_huc.c +66 -0
99 lines not on this page · raw message
drivers/gpu/drm/xe/xe_huc_types.h +5 -0
@@ -6,6 +6,8 @@#ifndef _XE_HUC_TYPES_H_#define _XE_HUC_TYPES_H_ +#include <linux/workqueue.h> +#include "xe_uc_fw_types.h" struct xe_bo ;
@@ -19,6 +21,9 @@ struct xe_huc {/** @gsc_pkt: bo to store the packet for auth via GSC */ struct xe_bo *gsc_pkt; + +/** @auth_work: deferred authentication deferred work */ + struct delayed_work auth_work; };#endif
drivers/gpu/drm/xe/xe_mei_dg2.c new file +120 -0
120 lines not on this page · raw message
drivers/gpu/drm/xe/xe_mei_dg2.h new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright (c) 2026 Intel Corporation. All rights reserved. +*/ + +#ifndef __XE_MEI_DG2_H__ +#define __XE_MEI_DG2_H__ + +#include "xe_device.h" +#include "xe_huc.h" + +int xe_mei_dg2_auth_huc (struct xe_device *xe,struct xe_huc *huc); + +#endif /* __XE_MEI_DG2_H__ */
drivers/gpu/drm/xe/xe_uc_fw.c +39 -5
72 lines not on this page · raw message
drivers/gpu/drm/xe/xe_wa.c +2 -1
@@ -137,7 +137,8 @@ VISIBLE_IF_KUNIT const struct xe_rtp_table_sr gt_was = XE_RTP_TABLE_SR(XE_RTP_RULES (MEDIA_VERSION_RANGE (1200 ,1255 ),ENGINE_CLASS (VIDEO_DECODE ),FUNC (xe_rtp_match_even_instance)), -XE_RTP_ACTIONS (SET (VDBOX_CGCTL3F10 (0 ),IECPUNIT_CLKGATE_DIS )), +XE_RTP_ACTIONS (SET (VDBOX_CGCTL3F10 (0 ),IECPUNIT_CLKGATE_DIS , +XE_RTP_ACTION_FLAG (ENGINE_BASE ))),XE_RTP_ENTRY_FLAG (FOREACH_ENGINE ), }, { XE_RTP_NAME("14011059788"),
drivers/misc/mei/gsc-me.c +5 -0
@@ -278,6 +278,10 @@ static const struct auxiliary_device_id mei_gsc_id_table[] = { .name = "xe.mei-gscfi", .driver_data = MEI_ME_GSCFI_CFG, }, + { + .name = "xe.mei-gsc", + .driver_data = MEI_ME_GSC_CFG, + }, {/* sentinel */ }
@@ -299,5 +303,6 @@ MODULE_AUTHOR("Intel Corporation");MODULE_ALIAS ("auxiliary:i915.mei-gsc" );MODULE_ALIAS ("auxiliary:i915.mei-gscfi" );MODULE_ALIAS ("auxiliary:xe.mei-gscfi" ); +MODULE_ALIAS ("auxiliary:xe.mei-gsc" );MODULE_DESCRIPTION ("Intel(R) Graphics System Controller" );MODULE_LICENSE ("GPL" );
Signature · 1 line
GitLab
Patchwork
CI✗ LGCI.VerificationFailed: failure for drm/xe: add DG2 HuC GSC support and MEI integration (rev3)
== Series Details ==
== Series Details ==
Series: drm/xe: add DG2 HuC GSC support and MEI integration (rev3)
URL : https://patchwork.freedesktop.org/series/171462/
State : failure
== Summary ==
Series author address '[email protected]' is not on the allowlist, which prevents CI from being automatically triggered. If you want CI to run for this series, ask Patchwork project owners to click 'retest' on the series in Patchwork. Exception occurred during validation, bailing out!
Build URL: http://intel-gfx-ci-public.igk.intel.com:8080/job/xe_pw_trigger/1236179/ (on master)