* [PATCH 0/4] drm/xe/gsc: add initial gsc support
@ 2023-09-12 13:08 Alexander Usyskin
2023-09-12 13:08 ` [PATCH 1/4] drm/xe/gsc: add HECI2 register offsets Alexander Usyskin
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Alexander Usyskin @ 2023-09-12 13:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, Lucas De Marchi, Daniele Ceraolo Spurio,
Rodrigo Vivi
Cc: Tomas Winkler, Alexander Usyskin, Vitaly Lubart, intel-xe, linux-kernel
Add initial GSC support for DG1 and DG2.
Create mei-gscfi auxiliary device and add
support for device created by Xe to the mei-gsc driver.
This series intended to be merged intto Xe tree,
the only patch that touches char-misc is addition
of id and alias in mei-gsc.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Vitaly Lubart (4):
drm/xe/gsc: add HECI2 register offsets
drm/xe/gsc: add has_heci_gscfi indication to device
drm/xe/gsc: add gsc device support
mei: gsc: add support for auxiliary device created by Xe driver
drivers/gpu/drm/xe/Kconfig | 1 +
drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/regs/xe_regs.h | 4 +
drivers/gpu/drm/xe/xe_device_types.h | 3 +
drivers/gpu/drm/xe/xe_gt.c | 4 +
drivers/gpu/drm/xe/xe_gt_gsc.c | 218 +++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_gt_gsc.h | 36 +++++
drivers/gpu/drm/xe/xe_gt_types.h | 4 +
drivers/gpu/drm/xe/xe_irq.c | 11 +-
drivers/gpu/drm/xe/xe_pci.c | 9 +-
drivers/misc/mei/gsc-me.c | 5 +
11 files changed, 292 insertions(+), 4 deletions(-)
create mode 100644 drivers/gpu/drm/xe/xe_gt_gsc.c
create mode 100644 drivers/gpu/drm/xe/xe_gt_gsc.h
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/4] drm/xe/gsc: add HECI2 register offsets 2023-09-12 13:08 [PATCH 0/4] drm/xe/gsc: add initial gsc support Alexander Usyskin @ 2023-09-12 13:08 ` Alexander Usyskin 2023-09-12 13:08 ` [PATCH 2/4] drm/xe/gsc: add has_heci_gscfi indication to device Alexander Usyskin ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: Alexander Usyskin @ 2023-09-12 13:08 UTC (permalink / raw) To: Greg Kroah-Hartman, Lucas De Marchi, Daniele Ceraolo Spurio, Rodrigo Vivi Cc: Tomas Winkler, Alexander Usyskin, Vitaly Lubart, intel-xe, linux-kernel From: Vitaly Lubart <vitaly.lubart@intel.com> Add HECI2 register offsets for DG1 and DG2 to regs/xe_regs.h Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> --- drivers/gpu/drm/xe/regs/xe_regs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xe/regs/xe_regs.h b/drivers/gpu/drm/xe/regs/xe_regs.h index 77aa3dab321a..5d9380f307cc 100644 --- a/drivers/gpu/drm/xe/regs/xe_regs.h +++ b/drivers/gpu/drm/xe/regs/xe_regs.h @@ -33,6 +33,10 @@ #define XEHPC_BCS6_RING_BASE 0x3ea000 #define XEHPC_BCS7_RING_BASE 0x3ec000 #define XEHPC_BCS8_RING_BASE 0x3ee000 + +#define DG1_GSC_HECI2_BASE 0x00259000 +#define DG2_GSC_HECI2_BASE 0x00374000 + #define GSCCS_RING_BASE 0x11a000 #define GT_WAIT_SEMAPHORE_INTERRUPT REG_BIT(11) #define GT_CONTEXT_SWITCH_INTERRUPT REG_BIT(8) -- 2.34.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/4] drm/xe/gsc: add has_heci_gscfi indication to device 2023-09-12 13:08 [PATCH 0/4] drm/xe/gsc: add initial gsc support Alexander Usyskin 2023-09-12 13:08 ` [PATCH 1/4] drm/xe/gsc: add HECI2 register offsets Alexander Usyskin @ 2023-09-12 13:08 ` Alexander Usyskin 2023-09-12 13:08 ` [PATCH 3/4] drm/xe/gsc: add gsc device support Alexander Usyskin 2023-09-12 13:08 ` [PATCH 4/4] mei: gsc: add support for auxiliary device created by Xe driver Alexander Usyskin 3 siblings, 0 replies; 8+ messages in thread From: Alexander Usyskin @ 2023-09-12 13:08 UTC (permalink / raw) To: Greg Kroah-Hartman, Lucas De Marchi, Daniele Ceraolo Spurio, Rodrigo Vivi Cc: Tomas Winkler, Alexander Usyskin, Vitaly Lubart, intel-xe, linux-kernel From: Vitaly Lubart <vitaly.lubart@intel.com> Mark support of MEI-GSC interaction per device. Add has_heci_gscfi indication to xe_device and xe_pci structures. Mark DG1 and DG2 devices as supported. Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> --- drivers/gpu/drm/xe/xe_device_types.h | 3 +++ drivers/gpu/drm/xe/xe_pci.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h index e4391c94e576..bac3d893b128 100644 --- a/drivers/gpu/drm/xe/xe_device_types.h +++ b/drivers/gpu/drm/xe/xe_device_types.h @@ -34,6 +34,7 @@ struct xe_ggtt; #define GRAPHICS_VERx100(xe) ((xe)->info.graphics_verx100) #define MEDIA_VERx100(xe) ((xe)->info.media_verx100) #define IS_DGFX(xe) ((xe)->info.is_dgfx) +#define HAS_HECI_GSCFI(xe) ((xe)->info.has_heci_gscfi) #define XE_VRAM_FLAGS_NEED64K BIT(0) @@ -242,6 +243,8 @@ struct xe_device { u8 has_link_copy_engine:1; /** @enable_display: display enabled */ u8 enable_display:1; + /** @has_heci_gscfi: device has heci gscfi */ + u8 has_heci_gscfi:1; #if IS_ENABLED(CONFIG_DRM_XE_DISPLAY) const struct intel_display_device_info *display; diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 60f3474844e2..dcbef397e03e 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -79,6 +79,7 @@ struct xe_device_desc { u8 require_force_probe:1; u8 is_dgfx:1; u8 has_display:1; + u8 has_heci_gscfi:1; u8 has_llc:1; }; @@ -348,6 +349,7 @@ static const struct xe_device_desc dg1_desc = { PLATFORM(XE_DG1), .has_display = true, .require_force_probe = true, + .has_heci_gscfi = 1, }; static const u16 dg2_g10_ids[] = { XE_DG2_G10_IDS(NOP), XE_ATS_M150_IDS(NOP), 0 }; @@ -357,6 +359,7 @@ static const u16 dg2_g12_ids[] = { XE_DG2_G12_IDS(NOP), 0 }; #define DG2_FEATURES \ DGFX_FEATURES, \ PLATFORM(XE_DG2), \ + .has_heci_gscfi = 1, \ .subplatforms = (const struct xe_subplatform_desc[]) { \ { XE_SUBPLATFORM_DG2_G10, "G10", dg2_g10_ids }, \ { XE_SUBPLATFORM_DG2_G11, "G11", dg2_g11_ids }, \ @@ -686,6 +689,7 @@ static int xe_info_init(struct xe_device *xe, return -ENODEV; xe->info.is_dgfx = desc->is_dgfx; + xe->info.has_heci_gscfi = desc->has_heci_gscfi; xe->info.graphics_name = graphics_desc->name; xe->info.media_name = media_desc ? media_desc->name : "none"; xe->info.has_llc = desc->has_llc; @@ -830,7 +834,7 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) xe_display_info_init(xe); - drm_dbg(&xe->drm, "%s %s %04x:%04x dgfx:%d gfx:%s (%d.%02d) media:%s (%d.%02d) display:%s dma_m_s:%d tc:%d", + drm_dbg(&xe->drm, "%s %s %04x:%04x dgfx:%d gfx:%s (%d.%02d) media:%s (%d.%02d) display:%s dma_m_s:%d tc:%d gscfi:%d", desc->platform_name, subplatform_desc ? subplatform_desc->name : "", xe->info.devid, xe->info.revid, @@ -842,7 +846,8 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) xe->info.media_verx100 / 100, xe->info.media_verx100 % 100, str_yes_no(xe->info.enable_display), - xe->info.dma_mask_size, xe->info.tile_count); + xe->info.dma_mask_size, xe->info.tile_count, + xe->info.has_heci_gscfi); drm_dbg(&xe->drm, "Stepping = (G:%s, M:%s, D:%s, B:%s)\n", xe_step_name(xe->info.step.graphics), -- 2.34.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] drm/xe/gsc: add gsc device support 2023-09-12 13:08 [PATCH 0/4] drm/xe/gsc: add initial gsc support Alexander Usyskin 2023-09-12 13:08 ` [PATCH 1/4] drm/xe/gsc: add HECI2 register offsets Alexander Usyskin 2023-09-12 13:08 ` [PATCH 2/4] drm/xe/gsc: add has_heci_gscfi indication to device Alexander Usyskin @ 2023-09-12 13:08 ` Alexander Usyskin 2023-09-12 15:05 ` Daniele Ceraolo Spurio 2023-09-12 13:08 ` [PATCH 4/4] mei: gsc: add support for auxiliary device created by Xe driver Alexander Usyskin 3 siblings, 1 reply; 8+ messages in thread From: Alexander Usyskin @ 2023-09-12 13:08 UTC (permalink / raw) To: Greg Kroah-Hartman, Lucas De Marchi, Daniele Ceraolo Spurio, Rodrigo Vivi Cc: Tomas Winkler, Alexander Usyskin, Vitaly Lubart, intel-xe, linux-kernel From: Vitaly Lubart <vitaly.lubart@intel.com> Create mei-gscfi auxiliary device and configure interrupts to be consumed by mei-gsc device driver. Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> --- drivers/gpu/drm/xe/Kconfig | 1 + drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_gt.c | 4 + drivers/gpu/drm/xe/xe_gt_gsc.c | 218 +++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_gt_gsc.h | 36 +++++ drivers/gpu/drm/xe/xe_gt_types.h | 4 + drivers/gpu/drm/xe/xe_irq.c | 11 +- 7 files changed, 273 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/xe/xe_gt_gsc.c create mode 100644 drivers/gpu/drm/xe/xe_gt_gsc.h diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 0a4ea965645b..9d396ca7708a 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -36,6 +36,7 @@ config DRM_XE select DRM_SCHED select MMU_NOTIFIER select WANT_DEV_COREDUMP + select AUXILIARY_BUS help Experimental driver for Intel Xe series GPUs diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index 9a2245ffede2..9ba9389a2cfd 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -65,6 +65,7 @@ xe-y += xe_bb.o \ xe_gt_sysfs.o \ xe_gt_tlb_invalidation.o \ xe_gt_topology.o \ + xe_gt_gsc.o \ xe_guc.o \ xe_guc_ads.o \ xe_guc_ct.o \ diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index 4c7f66647a04..f373c139e1a1 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -76,6 +76,8 @@ static void gt_fini(struct drm_device *drm, void *arg) destroy_workqueue(gt->ordered_wq); + xe_gsc_fini(>->gsc); + for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i) xe_hw_fence_irq_finish(>->fence_irq[i]); } @@ -460,6 +462,8 @@ int xe_gt_init(struct xe_gt *gt) if (err) return err; + xe_gsc_init(>->gsc, gt_to_xe(gt)); + err = drmm_add_action_or_reset(>_to_xe(gt)->drm, gt_fini, gt); if (err) return err; diff --git a/drivers/gpu/drm/xe/xe_gt_gsc.c b/drivers/gpu/drm/xe/xe_gt_gsc.c new file mode 100644 index 000000000000..ed825c883da7 --- /dev/null +++ b/drivers/gpu/drm/xe/xe_gt_gsc.c @@ -0,0 +1,218 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright(c) 2023, Intel Corporation. All rights reserved. + */ + +#include <linux/irq.h> +#include <linux/mei_aux.h> +#include <linux/pci.h> +#include <linux/sizes.h> + +#include "regs/xe_regs.h" +#include "xe_drv.h" +#include "xe_gt_gsc.h" +#include "xe_gt_types.h" +#include "xe_device_types.h" +#include "xe_platform_types.h" + +#define GSC_BAR_LENGTH 0x00000FFC + +static void gsc_irq_mask(struct irq_data *d) +{ + /* generic irq handling */ +} + +static void gsc_irq_unmask(struct irq_data *d) +{ + /* generic irq handling */ +} + +static struct irq_chip gsc_irq_chip = { + .name = "gsc_irq_chip", + .irq_mask = gsc_irq_mask, + .irq_unmask = gsc_irq_unmask, +}; + +static inline struct xe_gt *gsc_to_gt(struct xe_gsc *gsc) +{ + return container_of(gsc, struct xe_gt, gsc); +} + +static int gsc_irq_init(int irq) +{ + irq_set_chip_and_handler_name(irq, &gsc_irq_chip, + handle_simple_irq, "gsc_irq_handler"); + + return irq_set_chip_data(irq, NULL); +} + +/** + * struct gsc_def - graphics security controller heci interface definistions + * + * @name: name of the heci device + * @bar: address of the mmio bar + * @bar_size: size of the mmio bar + * @use_polling: indication of using polling mode for the device + * @slow_firmware: indication of whether the device is slow (needs longer timeouts) + */ +struct gsc_def { + const char *name; + unsigned long bar; + size_t bar_size; + bool use_polling; + bool slow_firmware; +}; + +/* gsc resources and definitions */ +static const struct gsc_def gsc_def_dg1 = { + .name = "mei-gscfi", + .bar = DG1_GSC_HECI2_BASE, + .bar_size = GSC_BAR_LENGTH, +}; + +static const struct gsc_def gsc_def_dg2 = { + .name = "mei-gscfi", + .bar = DG2_GSC_HECI2_BASE, + .bar_size = GSC_BAR_LENGTH, +}; + +static void gsc_release_dev(struct device *dev) +{ + struct auxiliary_device *aux_dev = to_auxiliary_dev(dev); + struct mei_aux_device *adev = auxiliary_dev_to_mei_aux_dev(aux_dev); + + kfree(adev); +} + +void xe_gsc_fini(struct xe_gsc *gsc) +{ + struct xe_gt *gt = gsc_to_gt(gsc); + + if (!HAS_HECI_GSCFI(gt_to_xe(gt))) + return; + + if (gsc->adev) { + struct auxiliary_device *aux_dev = &gsc->adev->aux_dev; + + auxiliary_device_delete(aux_dev); + auxiliary_device_uninit(aux_dev); + gsc->adev = NULL; + } + + if (gsc->irq >= 0) + irq_free_desc(gsc->irq); + gsc->irq = -1; +} + +void xe_gsc_init(struct xe_gsc *gsc, struct xe_device *xe) +{ + struct pci_dev *pdev = to_pci_dev(xe->drm.dev); + struct mei_aux_device *adev; + struct auxiliary_device *aux_dev; + const struct gsc_def *def; + int ret; + + if (!HAS_HECI_GSCFI(xe)) + return; + + gsc->irq = -1; + + /* + * On the multi-tile setups the GSC is functional on the first tile only + */ + if (gsc_to_gt(gsc)->info.id != 0) { + drm_dbg(&xe->drm, "Not initializing gsc for remote tiles\n"); + return; + } + + if (xe->info.platform == XE_DG1) { + def = &gsc_def_dg1; + } else if (xe->info.platform == XE_DG2) { + def = &gsc_def_dg2; + } else { + drm_warn_once(&xe->drm, "Unknown platform\n"); + return; + } + + if (!def->name) { + drm_warn_once(&xe->drm, "HECI is not implemented!\n"); + return; + } + + /* skip irq initialization */ + if (def->use_polling) + goto add_device; + + gsc->irq = irq_alloc_desc(0); + if (gsc->irq < 0) { + drm_err(&xe->drm, "gsc irq error %d\n", gsc->irq); + goto fail; + } + + ret = gsc_irq_init(gsc->irq); + if (ret < 0) { + drm_err(&xe->drm, "gsc irq init failed %d\n", ret); + goto fail; + } + +add_device: + adev = kzalloc(sizeof(*adev), GFP_KERNEL); + if (!adev) + goto fail; + adev->irq = gsc->irq; + adev->bar.parent = &pdev->resource[0]; + adev->bar.start = def->bar + pdev->resource[0].start; + adev->bar.end = adev->bar.start + def->bar_size - 1; + adev->bar.flags = IORESOURCE_MEM; + adev->bar.desc = IORES_DESC_NONE; + adev->slow_firmware = def->slow_firmware; + + aux_dev = &adev->aux_dev; + aux_dev->name = def->name; + aux_dev->id = (pci_domain_nr(pdev->bus) << 16) | + PCI_DEVID(pdev->bus->number, pdev->devfn); + aux_dev->dev.parent = &pdev->dev; + aux_dev->dev.release = gsc_release_dev; + + ret = auxiliary_device_init(aux_dev); + if (ret < 0) { + drm_err(&xe->drm, "gsc aux init failed %d\n", ret); + kfree(adev); + goto fail; + } + + gsc->adev = adev; /* needed by the notifier */ + ret = auxiliary_device_add(aux_dev); + if (ret < 0) { + drm_err(&xe->drm, "gsc aux add failed %d\n", ret); + gsc->adev = NULL; + + /* adev will be freed with the put_device() and .release sequence */ + auxiliary_device_uninit(aux_dev); + goto fail; + } + + return; +fail: + xe_gsc_fini(gsc); +} + +void xe_gsc_irq_handler(struct xe_gt *gt, u32 iir) +{ + int ret; + + if ((iir & GSC_IRQ_INTF(1)) == 0) + return; + + if (!HAS_HECI_GSCFI(gt_to_xe(gt))) { + drm_warn_once(>_to_xe(gt)->drm, "GSC irq: not supported"); + return; + } + + if (gt->gsc.irq < 0) + return; + + ret = generic_handle_irq(gt->gsc.irq); + if (ret) + drm_err_ratelimited(>_to_xe(gt)->drm, "error handling GSC irq: %d\n", ret); +} diff --git a/drivers/gpu/drm/xe/xe_gt_gsc.h b/drivers/gpu/drm/xe/xe_gt_gsc.h new file mode 100644 index 000000000000..91dba19e47c1 --- /dev/null +++ b/drivers/gpu/drm/xe/xe_gt_gsc.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright(c) 2023, Intel Corporation. All rights reserved. + */ +#ifndef __XE_GSC_DEV_H__ +#define __XE_GSC_DEV_H__ + +#include <linux/types.h> + +struct xe_device; +struct xe_gt; +struct mei_aux_device; + +/* + * The HECI1 bit corresponds to bit15 and HECI2 to bit14. + * The reason for this is to allow growth for more interfaces in the future. + */ +#define GSC_IRQ_INTF(_x) BIT(15 - (_x)) + +/** + * struct xe_gsc - graphics security controller for xe + * + * @adev : pointer to mei auxiliary device structure + * @irq : irq number + * + */ +struct xe_gsc { + struct mei_aux_device *adev; + int irq; +}; + +void xe_gsc_init(struct xe_gsc *gsc, struct xe_device *xe); +void xe_gsc_fini(struct xe_gsc *gsc); +void xe_gsc_irq_handler(struct xe_gt *gt, u32 iir); + +#endif /* __XE_GSC_DEV_H__ */ diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h index f11da12d3146..1b8ab32b488d 100644 --- a/drivers/gpu/drm/xe/xe_gt_types.h +++ b/drivers/gpu/drm/xe/xe_gt_types.h @@ -13,6 +13,7 @@ #include "xe_reg_sr_types.h" #include "xe_sa_types.h" #include "xe_uc_types.h" +#include "xe_gt_gsc.h" struct xe_exec_queue_ops; struct xe_migrate; @@ -267,6 +268,9 @@ struct xe_gt { /** @uc: micro controllers on the GT */ struct xe_uc uc; + /** @gsc: graphics security controller */ + struct xe_gsc gsc; + /** @gtidle: idle properties of GT */ struct xe_gt_idle gtidle; diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c index 1dee3e832eb5..1ae4cc9f1522 100644 --- a/drivers/gpu/drm/xe/xe_irq.c +++ b/drivers/gpu/drm/xe/xe_irq.c @@ -128,6 +128,7 @@ void xe_irq_enable_hwe(struct xe_gt *gt) struct xe_device *xe = gt_to_xe(gt); u32 ccs_mask, bcs_mask; u32 irqs, dmask, smask; + u32 gsc_mask = GSC_IRQ_INTF(1); if (xe_device_guc_submission_enabled(xe)) { irqs = GT_RENDER_USER_INTERRUPT | @@ -180,6 +181,9 @@ void xe_irq_enable_hwe(struct xe_gt *gt) if (xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_OTHER)) { xe_mmio_write32(gt, GUNIT_GSC_INTR_ENABLE, irqs); xe_mmio_write32(gt, GUNIT_GSC_INTR_MASK, ~irqs); + } else if (HAS_HECI_GSCFI(xe)) { + xe_mmio_write32(gt, GUNIT_GSC_INTR_ENABLE, gsc_mask); + xe_mmio_write32(gt, GUNIT_GSC_INTR_MASK, ~gsc_mask); } } } @@ -227,6 +231,8 @@ gt_other_irq_handler(struct xe_gt *gt, const u8 instance, const u16 iir) return xe_guc_irq_handler(>->uc.guc, iir); if (instance == OTHER_MEDIA_GUC_INSTANCE && xe_gt_is_media_type(gt)) return xe_guc_irq_handler(>->uc.guc, iir); + if (instance == OTHER_GSC_INSTANCE) + return xe_gsc_irq_handler(gt, iir); if (instance != OTHER_GUC_INSTANCE && instance != OTHER_MEDIA_GUC_INSTANCE) { @@ -470,8 +476,9 @@ static void gt_irq_reset(struct xe_tile *tile) if (ccs_mask & (BIT(2)|BIT(3))) xe_mmio_write32(mmio, CCS2_CCS3_INTR_MASK, ~0); - if (tile->media_gt && - xe_hw_engine_mask_per_class(tile->media_gt, XE_ENGINE_CLASS_OTHER)) { + if ((tile->media_gt && + xe_hw_engine_mask_per_class(tile->media_gt, XE_ENGINE_CLASS_OTHER)) || + HAS_HECI_GSCFI(tile_to_xe(tile))) { xe_mmio_write32(mmio, GUNIT_GSC_INTR_ENABLE, 0); xe_mmio_write32(mmio, GUNIT_GSC_INTR_MASK, ~0); } -- 2.34.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/4] drm/xe/gsc: add gsc device support 2023-09-12 13:08 ` [PATCH 3/4] drm/xe/gsc: add gsc device support Alexander Usyskin @ 2023-09-12 15:05 ` Daniele Ceraolo Spurio 2023-09-13 12:48 ` Usyskin, Alexander 0 siblings, 1 reply; 8+ messages in thread From: Daniele Ceraolo Spurio @ 2023-09-12 15:05 UTC (permalink / raw) To: Alexander Usyskin, Greg Kroah-Hartman, Lucas De Marchi, Rodrigo Vivi Cc: Tomas Winkler, Vitaly Lubart, intel-xe, linux-kernel On 9/12/2023 6:08 AM, Alexander Usyskin wrote: > From: Vitaly Lubart <vitaly.lubart@intel.com> > > Create mei-gscfi auxiliary device and configure interrupts > to be consumed by mei-gsc device driver. > > Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com> > Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> > --- > drivers/gpu/drm/xe/Kconfig | 1 + > drivers/gpu/drm/xe/Makefile | 1 + > drivers/gpu/drm/xe/xe_gt.c | 4 + > drivers/gpu/drm/xe/xe_gt_gsc.c | 218 +++++++++++++++++++++++++++++++ > drivers/gpu/drm/xe/xe_gt_gsc.h | 36 +++++ > drivers/gpu/drm/xe/xe_gt_types.h | 4 + > drivers/gpu/drm/xe/xe_irq.c | 11 +- > 7 files changed, 273 insertions(+), 2 deletions(-) > create mode 100644 drivers/gpu/drm/xe/xe_gt_gsc.c > create mode 100644 drivers/gpu/drm/xe/xe_gt_gsc.h > > diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig > index 0a4ea965645b..9d396ca7708a 100644 > --- a/drivers/gpu/drm/xe/Kconfig > +++ b/drivers/gpu/drm/xe/Kconfig > @@ -36,6 +36,7 @@ config DRM_XE > select DRM_SCHED > select MMU_NOTIFIER > select WANT_DEV_COREDUMP > + select AUXILIARY_BUS > help > Experimental driver for Intel Xe series GPUs > > diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile > index 9a2245ffede2..9ba9389a2cfd 100644 > --- a/drivers/gpu/drm/xe/Makefile > +++ b/drivers/gpu/drm/xe/Makefile > @@ -65,6 +65,7 @@ xe-y += xe_bb.o \ > xe_gt_sysfs.o \ > xe_gt_tlb_invalidation.o \ > xe_gt_topology.o \ > + xe_gt_gsc.o \ I don't think this should be inside GT. The HECI GSC is not inside GT in HW and the only reason it was added there in i915 was because it made the interrupt management easier. This is no longer the case for Xe, so this can be added directly under the xe_device and match the HW. > xe_guc.o \ > xe_guc_ads.o \ > xe_guc_ct.o \ > diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c > index 4c7f66647a04..f373c139e1a1 100644 > --- a/drivers/gpu/drm/xe/xe_gt.c > +++ b/drivers/gpu/drm/xe/xe_gt.c > @@ -76,6 +76,8 @@ static void gt_fini(struct drm_device *drm, void *arg) > > destroy_workqueue(gt->ordered_wq); > > + xe_gsc_fini(>->gsc); I'm not sure this is safe. gt_fini is called from the drmm cleanup, which means it is called after the Xe driver has already been detached from the PCI device. That seems too late to destroy the child device, IMO that should be removed before we detach from the PCI device. > + > for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i) > xe_hw_fence_irq_finish(>->fence_irq[i]); > } > @@ -460,6 +462,8 @@ int xe_gt_init(struct xe_gt *gt) > if (err) > return err; > > + xe_gsc_init(>->gsc, gt_to_xe(gt)); > + > err = drmm_add_action_or_reset(>_to_xe(gt)->drm, gt_fini, gt); > if (err) > return err; > diff --git a/drivers/gpu/drm/xe/xe_gt_gsc.c b/drivers/gpu/drm/xe/xe_gt_gsc.c > new file mode 100644 > index 000000000000..ed825c883da7 > --- /dev/null > +++ b/drivers/gpu/drm/xe/xe_gt_gsc.c > @@ -0,0 +1,218 @@ > +// SPDX-License-Identifier: MIT > +/* > + * Copyright(c) 2023, Intel Corporation. All rights reserved. > + */ > + > +#include <linux/irq.h> > +#include <linux/mei_aux.h> > +#include <linux/pci.h> > +#include <linux/sizes.h> > + > +#include "regs/xe_regs.h" > +#include "xe_drv.h" > +#include "xe_gt_gsc.h" > +#include "xe_gt_types.h" > +#include "xe_device_types.h" > +#include "xe_platform_types.h" > + > +#define GSC_BAR_LENGTH 0x00000FFC > + > +static void gsc_irq_mask(struct irq_data *d) > +{ > + /* generic irq handling */ > +} > + > +static void gsc_irq_unmask(struct irq_data *d) > +{ > + /* generic irq handling */ > +} > + > +static struct irq_chip gsc_irq_chip = { > + .name = "gsc_irq_chip", > + .irq_mask = gsc_irq_mask, > + .irq_unmask = gsc_irq_unmask, > +}; > + > +static inline struct xe_gt *gsc_to_gt(struct xe_gsc *gsc) > +{ > + return container_of(gsc, struct xe_gt, gsc); > +} > + > +static int gsc_irq_init(int irq) > +{ > + irq_set_chip_and_handler_name(irq, &gsc_irq_chip, > + handle_simple_irq, "gsc_irq_handler"); > + > + return irq_set_chip_data(irq, NULL); > +} > + > +/** > + * struct gsc_def - graphics security controller heci interface definistions > + * > + * @name: name of the heci device > + * @bar: address of the mmio bar > + * @bar_size: size of the mmio bar > + * @use_polling: indication of using polling mode for the device > + * @slow_firmware: indication of whether the device is slow (needs longer timeouts) > + */ > +struct gsc_def { > + const char *name; > + unsigned long bar; > + size_t bar_size; > + bool use_polling; > + bool slow_firmware; > +}; > + > +/* gsc resources and definitions */ > +static const struct gsc_def gsc_def_dg1 = { > + .name = "mei-gscfi", > + .bar = DG1_GSC_HECI2_BASE, > + .bar_size = GSC_BAR_LENGTH, > +}; > + > +static const struct gsc_def gsc_def_dg2 = { > + .name = "mei-gscfi", > + .bar = DG2_GSC_HECI2_BASE, > + .bar_size = GSC_BAR_LENGTH, > +}; > + > +static void gsc_release_dev(struct device *dev) > +{ > + struct auxiliary_device *aux_dev = to_auxiliary_dev(dev); > + struct mei_aux_device *adev = auxiliary_dev_to_mei_aux_dev(aux_dev); > + > + kfree(adev); > +} > + > +void xe_gsc_fini(struct xe_gsc *gsc) > +{ > + struct xe_gt *gt = gsc_to_gt(gsc); > + > + if (!HAS_HECI_GSCFI(gt_to_xe(gt))) > + return; > + > + if (gsc->adev) { > + struct auxiliary_device *aux_dev = &gsc->adev->aux_dev; > + > + auxiliary_device_delete(aux_dev); > + auxiliary_device_uninit(aux_dev); > + gsc->adev = NULL; > + } > + > + if (gsc->irq >= 0) > + irq_free_desc(gsc->irq); > + gsc->irq = -1; > +} > + > +void xe_gsc_init(struct xe_gsc *gsc, struct xe_device *xe) > +{ > + struct pci_dev *pdev = to_pci_dev(xe->drm.dev); > + struct mei_aux_device *adev; > + struct auxiliary_device *aux_dev; > + const struct gsc_def *def; > + int ret; > + > + if (!HAS_HECI_GSCFI(xe)) > + return; > + > + gsc->irq = -1; > + > + /* > + * On the multi-tile setups the GSC is functional on the first tile only > + */ > + if (gsc_to_gt(gsc)->info.id != 0) { > + drm_dbg(&xe->drm, "Not initializing gsc for remote tiles\n"); > + return; > + } > + > + if (xe->info.platform == XE_DG1) { > + def = &gsc_def_dg1; > + } else if (xe->info.platform == XE_DG2) { > + def = &gsc_def_dg2; > + } else { > + drm_warn_once(&xe->drm, "Unknown platform\n"); > + return; > + } > + > + if (!def->name) { > + drm_warn_once(&xe->drm, "HECI is not implemented!\n"); > + return; > + } > + > + /* skip irq initialization */ > + if (def->use_polling) > + goto add_device; > + > + gsc->irq = irq_alloc_desc(0); > + if (gsc->irq < 0) { > + drm_err(&xe->drm, "gsc irq error %d\n", gsc->irq); > + goto fail; > + } > + > + ret = gsc_irq_init(gsc->irq); > + if (ret < 0) { > + drm_err(&xe->drm, "gsc irq init failed %d\n", ret); > + goto fail; > + } > + > +add_device: > + adev = kzalloc(sizeof(*adev), GFP_KERNEL); > + if (!adev) > + goto fail; > + adev->irq = gsc->irq; > + adev->bar.parent = &pdev->resource[0]; > + adev->bar.start = def->bar + pdev->resource[0].start; > + adev->bar.end = adev->bar.start + def->bar_size - 1; > + adev->bar.flags = IORESOURCE_MEM; > + adev->bar.desc = IORES_DESC_NONE; > + adev->slow_firmware = def->slow_firmware; > + > + aux_dev = &adev->aux_dev; > + aux_dev->name = def->name; > + aux_dev->id = (pci_domain_nr(pdev->bus) << 16) | > + PCI_DEVID(pdev->bus->number, pdev->devfn); > + aux_dev->dev.parent = &pdev->dev; > + aux_dev->dev.release = gsc_release_dev; > + > + ret = auxiliary_device_init(aux_dev); > + if (ret < 0) { > + drm_err(&xe->drm, "gsc aux init failed %d\n", ret); > + kfree(adev); > + goto fail; > + } > + > + gsc->adev = adev; /* needed by the notifier */ > + ret = auxiliary_device_add(aux_dev); > + if (ret < 0) { > + drm_err(&xe->drm, "gsc aux add failed %d\n", ret); > + gsc->adev = NULL; > + > + /* adev will be freed with the put_device() and .release sequence */ > + auxiliary_device_uninit(aux_dev); > + goto fail; > + } > + > + return; > +fail: > + xe_gsc_fini(gsc); > +} > + > +void xe_gsc_irq_handler(struct xe_gt *gt, u32 iir) > +{ > + int ret; > + > + if ((iir & GSC_IRQ_INTF(1)) == 0) > + return; > + > + if (!HAS_HECI_GSCFI(gt_to_xe(gt))) { > + drm_warn_once(>_to_xe(gt)->drm, "GSC irq: not supported"); > + return; > + } > + > + if (gt->gsc.irq < 0) > + return; > + > + ret = generic_handle_irq(gt->gsc.irq); > + if (ret) > + drm_err_ratelimited(>_to_xe(gt)->drm, "error handling GSC irq: %d\n", ret); > +} > diff --git a/drivers/gpu/drm/xe/xe_gt_gsc.h b/drivers/gpu/drm/xe/xe_gt_gsc.h > new file mode 100644 > index 000000000000..91dba19e47c1 > --- /dev/null > +++ b/drivers/gpu/drm/xe/xe_gt_gsc.h > @@ -0,0 +1,36 @@ > +/* SPDX-License-Identifier: MIT */ > +/* > + * Copyright(c) 2023, Intel Corporation. All rights reserved. > + */ > +#ifndef __XE_GSC_DEV_H__ > +#define __XE_GSC_DEV_H__ > + > +#include <linux/types.h> > + > +struct xe_device; > +struct xe_gt; > +struct mei_aux_device; > + > +/* > + * The HECI1 bit corresponds to bit15 and HECI2 to bit14. > + * The reason for this is to allow growth for more interfaces in the future. > + */ > +#define GSC_IRQ_INTF(_x) BIT(15 - (_x)) > + > +/** > + * struct xe_gsc - graphics security controller for xe > + * > + * @adev : pointer to mei auxiliary device structure > + * @irq : irq number > + * > + */ > +struct xe_gsc { Please use a different name for this instead of just xe_gsc. In Xe we're likely never going to fully use the GSC via HECI, only the GSCFI/CSC part. In MTL and newer we also have the actual GSC part being split off and placed inside GT (behind the GSCCS), so if we call this just xe_gsc as well it'll be confusing. I suggest calling this something like xe_heci_gsc, xe_heci_interface or something like that. I had actually suggested this for i915 as well (https://patchwork.freedesktop.org/patch/509653/) but Tomas was concerned it might make backporting fixes difficult, so I dropped it; this is not a concern for Xe right now. Note that this means renaming all the exposed functions as well. Daniele > + struct mei_aux_device *adev; > + int irq; > +}; > + > +void xe_gsc_init(struct xe_gsc *gsc, struct xe_device *xe); > +void xe_gsc_fini(struct xe_gsc *gsc); > +void xe_gsc_irq_handler(struct xe_gt *gt, u32 iir); > + > +#endif /* __XE_GSC_DEV_H__ */ > diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h > index f11da12d3146..1b8ab32b488d 100644 > --- a/drivers/gpu/drm/xe/xe_gt_types.h > +++ b/drivers/gpu/drm/xe/xe_gt_types.h > @@ -13,6 +13,7 @@ > #include "xe_reg_sr_types.h" > #include "xe_sa_types.h" > #include "xe_uc_types.h" > +#include "xe_gt_gsc.h" > > struct xe_exec_queue_ops; > struct xe_migrate; > @@ -267,6 +268,9 @@ struct xe_gt { > /** @uc: micro controllers on the GT */ > struct xe_uc uc; > > + /** @gsc: graphics security controller */ > + struct xe_gsc gsc; > + > /** @gtidle: idle properties of GT */ > struct xe_gt_idle gtidle; > > diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c > index 1dee3e832eb5..1ae4cc9f1522 100644 > --- a/drivers/gpu/drm/xe/xe_irq.c > +++ b/drivers/gpu/drm/xe/xe_irq.c > @@ -128,6 +128,7 @@ void xe_irq_enable_hwe(struct xe_gt *gt) > struct xe_device *xe = gt_to_xe(gt); > u32 ccs_mask, bcs_mask; > u32 irqs, dmask, smask; > + u32 gsc_mask = GSC_IRQ_INTF(1); > > if (xe_device_guc_submission_enabled(xe)) { > irqs = GT_RENDER_USER_INTERRUPT | > @@ -180,6 +181,9 @@ void xe_irq_enable_hwe(struct xe_gt *gt) > if (xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_OTHER)) { > xe_mmio_write32(gt, GUNIT_GSC_INTR_ENABLE, irqs); > xe_mmio_write32(gt, GUNIT_GSC_INTR_MASK, ~irqs); > + } else if (HAS_HECI_GSCFI(xe)) { > + xe_mmio_write32(gt, GUNIT_GSC_INTR_ENABLE, gsc_mask); > + xe_mmio_write32(gt, GUNIT_GSC_INTR_MASK, ~gsc_mask); > } > } > } > @@ -227,6 +231,8 @@ gt_other_irq_handler(struct xe_gt *gt, const u8 instance, const u16 iir) > return xe_guc_irq_handler(>->uc.guc, iir); > if (instance == OTHER_MEDIA_GUC_INSTANCE && xe_gt_is_media_type(gt)) > return xe_guc_irq_handler(>->uc.guc, iir); > + if (instance == OTHER_GSC_INSTANCE) > + return xe_gsc_irq_handler(gt, iir); > > if (instance != OTHER_GUC_INSTANCE && > instance != OTHER_MEDIA_GUC_INSTANCE) { > @@ -470,8 +476,9 @@ static void gt_irq_reset(struct xe_tile *tile) > if (ccs_mask & (BIT(2)|BIT(3))) > xe_mmio_write32(mmio, CCS2_CCS3_INTR_MASK, ~0); > > - if (tile->media_gt && > - xe_hw_engine_mask_per_class(tile->media_gt, XE_ENGINE_CLASS_OTHER)) { > + if ((tile->media_gt && > + xe_hw_engine_mask_per_class(tile->media_gt, XE_ENGINE_CLASS_OTHER)) || > + HAS_HECI_GSCFI(tile_to_xe(tile))) { > xe_mmio_write32(mmio, GUNIT_GSC_INTR_ENABLE, 0); > xe_mmio_write32(mmio, GUNIT_GSC_INTR_MASK, ~0); > } ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH 3/4] drm/xe/gsc: add gsc device support 2023-09-12 15:05 ` Daniele Ceraolo Spurio @ 2023-09-13 12:48 ` Usyskin, Alexander 2023-09-13 15:59 ` Daniele Ceraolo Spurio 0 siblings, 1 reply; 8+ messages in thread From: Usyskin, Alexander @ 2023-09-13 12:48 UTC (permalink / raw) To: Ceraolo Spurio, Daniele, Greg Kroah-Hartman, De Marchi, Lucas, Vivi, Rodrigo Cc: Winkler, Tomas, Lubart, Vitaly, intel-xe, linux-kernel > > +struct xe_gsc { > > Please use a different name for this instead of just xe_gsc. In Xe we're > likely never going to fully use the GSC via HECI, only the GSCFI/CSC > part. In MTL and newer we also have the actual GSC part being split off > and placed inside GT (behind the GSCCS), so if we call this just xe_gsc > as well it'll be confusing. I suggest calling this something like > xe_heci_gsc, xe_heci_interface or something like that. I had actually > suggested this for i915 as well > (https://patchwork.freedesktop.org/patch/509653/) but Tomas was > concerned it might make backporting fixes difficult, so I dropped it; > this is not a concern for Xe right now. > > Note that this means renaming all the exposed functions as well. > > Daniele > Sure, will rename it xe_heci_gsc and move to xe_device. > > diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c > > index 1dee3e832eb5..1ae4cc9f1522 100644 > > --- a/drivers/gpu/drm/xe/xe_irq.c > > +++ b/drivers/gpu/drm/xe/xe_irq.c > > @@ -128,6 +128,7 @@ void xe_irq_enable_hwe(struct xe_gt *gt) > > struct xe_device *xe = gt_to_xe(gt); > > u32 ccs_mask, bcs_mask; > > u32 irqs, dmask, smask; > > + u32 gsc_mask = GSC_IRQ_INTF(1); > > > > if (xe_device_guc_submission_enabled(xe)) { > > irqs = GT_RENDER_USER_INTERRUPT | > > @@ -180,6 +181,9 @@ void xe_irq_enable_hwe(struct xe_gt *gt) > > if (xe_hw_engine_mask_per_class(gt, > XE_ENGINE_CLASS_OTHER)) { > > xe_mmio_write32(gt, GUNIT_GSC_INTR_ENABLE, > irqs); > > xe_mmio_write32(gt, GUNIT_GSC_INTR_MASK, > ~irqs); > > + } else if (HAS_HECI_GSCFI(xe)) { > > + xe_mmio_write32(gt, GUNIT_GSC_INTR_ENABLE, > gsc_mask); > > + xe_mmio_write32(gt, GUNIT_GSC_INTR_MASK, > ~gsc_mask); Danielle, how this enablement should look when gsc_heci is not gt related? I'm somewhat confused here. -- Thanks, Sasha ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/4] drm/xe/gsc: add gsc device support 2023-09-13 12:48 ` Usyskin, Alexander @ 2023-09-13 15:59 ` Daniele Ceraolo Spurio 0 siblings, 0 replies; 8+ messages in thread From: Daniele Ceraolo Spurio @ 2023-09-13 15:59 UTC (permalink / raw) To: Usyskin, Alexander, Greg Kroah-Hartman, De Marchi, Lucas, Vivi, Rodrigo Cc: Winkler, Tomas, Lubart, Vitaly, intel-xe, linux-kernel On 9/13/2023 5:48 AM, Usyskin, Alexander wrote: >>> +struct xe_gsc { >> Please use a different name for this instead of just xe_gsc. In Xe we're >> likely never going to fully use the GSC via HECI, only the GSCFI/CSC >> part. In MTL and newer we also have the actual GSC part being split off >> and placed inside GT (behind the GSCCS), so if we call this just xe_gsc >> as well it'll be confusing. I suggest calling this something like >> xe_heci_gsc, xe_heci_interface or something like that. I had actually >> suggested this for i915 as well >> (https://patchwork.freedesktop.org/patch/509653/) but Tomas was >> concerned it might make backporting fixes difficult, so I dropped it; >> this is not a concern for Xe right now. >> >> Note that this means renaming all the exposed functions as well. >> >> Daniele >> > Sure, will rename it xe_heci_gsc and move to xe_device. > >>> diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c >>> index 1dee3e832eb5..1ae4cc9f1522 100644 >>> --- a/drivers/gpu/drm/xe/xe_irq.c >>> +++ b/drivers/gpu/drm/xe/xe_irq.c >>> @@ -128,6 +128,7 @@ void xe_irq_enable_hwe(struct xe_gt *gt) >>> struct xe_device *xe = gt_to_xe(gt); >>> u32 ccs_mask, bcs_mask; >>> u32 irqs, dmask, smask; >>> + u32 gsc_mask = GSC_IRQ_INTF(1); >>> >>> if (xe_device_guc_submission_enabled(xe)) { >>> irqs = GT_RENDER_USER_INTERRUPT | >>> @@ -180,6 +181,9 @@ void xe_irq_enable_hwe(struct xe_gt *gt) >>> if (xe_hw_engine_mask_per_class(gt, >> XE_ENGINE_CLASS_OTHER)) { >>> xe_mmio_write32(gt, GUNIT_GSC_INTR_ENABLE, >> irqs); >>> xe_mmio_write32(gt, GUNIT_GSC_INTR_MASK, >> ~irqs); >>> + } else if (HAS_HECI_GSCFI(xe)) { >>> + xe_mmio_write32(gt, GUNIT_GSC_INTR_ENABLE, >> gsc_mask); >>> + xe_mmio_write32(gt, GUNIT_GSC_INTR_MASK, >> ~gsc_mask); > Danielle, how this enablement should look when gsc_heci is not gt related? > I'm somewhat confused here. This one you should be able to leave as-is, and your check in HAS_HECI_GSCFI is already at the xe device level and not at the gt level. Unfortunately the mmio writes functions only allow a gt parameter for now, so we need to stick with that (I believe there is a plan to change it at some point). What will need to change is xe_gsc_irq_handler(), but you can change that to take the heci_gsc as a parameter and then do: xe_gsc_irq_handler(>_to_xe(gt)->heci_gsc, iir); Daniele > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/4] mei: gsc: add support for auxiliary device created by Xe driver 2023-09-12 13:08 [PATCH 0/4] drm/xe/gsc: add initial gsc support Alexander Usyskin ` (2 preceding siblings ...) 2023-09-12 13:08 ` [PATCH 3/4] drm/xe/gsc: add gsc device support Alexander Usyskin @ 2023-09-12 13:08 ` Alexander Usyskin 3 siblings, 0 replies; 8+ messages in thread From: Alexander Usyskin @ 2023-09-12 13:08 UTC (permalink / raw) To: Greg Kroah-Hartman, Lucas De Marchi, Daniele Ceraolo Spurio, Rodrigo Vivi Cc: Tomas Winkler, Alexander Usyskin, Vitaly Lubart, intel-xe, linux-kernel From: Vitaly Lubart <vitaly.lubart@intel.com> Add support for gsc mei auxiliary device created by Xe driver Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> --- drivers/misc/mei/gsc-me.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/misc/mei/gsc-me.c b/drivers/misc/mei/gsc-me.c index e63cabd0818d..63525778a4e0 100644 --- a/drivers/misc/mei/gsc-me.c +++ b/drivers/misc/mei/gsc-me.c @@ -292,6 +292,10 @@ static const struct auxiliary_device_id mei_gsc_id_table[] = { .name = "i915.mei-gscfi", .driver_data = MEI_ME_GSCFI_CFG, }, + { + .name = "xe.mei-gscfi", + .driver_data = MEI_ME_GSCFI_CFG, + }, { /* sentinel */ } @@ -312,4 +316,5 @@ module_auxiliary_driver(mei_gsc_driver); MODULE_AUTHOR("Intel Corporation"); MODULE_ALIAS("auxiliary:i915.mei-gsc"); MODULE_ALIAS("auxiliary:i915.mei-gscfi"); +MODULE_ALIAS("auxiliary:xe.mei-gscfi"); MODULE_LICENSE("GPL"); -- 2.34.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-09-13 15:59 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-09-12 13:08 [PATCH 0/4] drm/xe/gsc: add initial gsc support Alexander Usyskin 2023-09-12 13:08 ` [PATCH 1/4] drm/xe/gsc: add HECI2 register offsets Alexander Usyskin 2023-09-12 13:08 ` [PATCH 2/4] drm/xe/gsc: add has_heci_gscfi indication to device Alexander Usyskin 2023-09-12 13:08 ` [PATCH 3/4] drm/xe/gsc: add gsc device support Alexander Usyskin 2023-09-12 15:05 ` Daniele Ceraolo Spurio 2023-09-13 12:48 ` Usyskin, Alexander 2023-09-13 15:59 ` Daniele Ceraolo Spurio 2023-09-12 13:08 ` [PATCH 4/4] mei: gsc: add support for auxiliary device created by Xe driver Alexander Usyskin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®