[PATCH 03/11] drm/xe/bmg: Add BMG platform definition

Lucas De Marchi lucas.demarchi at intel.com
Tue Apr 2 13:26:58 UTC 2024


On Tue, Apr 02, 2024 at 06:17:16PM +0530, Balasubramani Vivekanandan wrote:
>From: Matt Roper <matthew.d.roper at intel.com>
>
>BMG is a discrete GPU based on the Xe2 architecture.
>
>Bspec: 68090
>Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
>Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan at intel.com>
>---
> drivers/gpu/drm/xe/xe_pci.c            | 7 +++++++
> drivers/gpu/drm/xe/xe_platform_types.h | 1 +
> include/drm/xe_pciids.h                | 7 +++++++
> 3 files changed, 15 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>index 2d3b18d6404e..1e3a81a19e9d 100644
>--- a/drivers/gpu/drm/xe/xe_pci.c
>+++ b/drivers/gpu/drm/xe/xe_pci.c
>@@ -337,6 +337,12 @@ static const struct xe_device_desc lnl_desc = {
> 	.require_force_probe = true,
> };
>
>+static const struct xe_device_desc bmg_desc = {
>+	DGFX_FEATURES,
>+	PLATFORM(XE_BATTLEMAGE),
>+	.require_force_probe = true,
>+};
>+
> #undef PLATFORM
> __diag_pop();
>
>@@ -381,6 +387,7 @@ static const struct pci_device_id pciidlist[] = {
> 	XE_PVC_IDS(INTEL_VGA_DEVICE, &pvc_desc),
> 	XE_MTL_IDS(INTEL_VGA_DEVICE, &mtl_desc),
> 	XE_LNL_IDS(INTEL_VGA_DEVICE, &lnl_desc),
>+	XE_BMG_IDS(INTEL_VGA_DEVICE, &bmg_desc),
> 	{ }
> };
> MODULE_DEVICE_TABLE(pci, pciidlist);
>diff --git a/drivers/gpu/drm/xe/xe_platform_types.h b/drivers/gpu/drm/xe/xe_platform_types.h
>index 553f53dbd093..79b7042c4534 100644
>--- a/drivers/gpu/drm/xe/xe_platform_types.h
>+++ b/drivers/gpu/drm/xe/xe_platform_types.h
>@@ -22,6 +22,7 @@ enum xe_platform {
> 	XE_PVC,
> 	XE_METEORLAKE,
> 	XE_LUNARLAKE,
>+	XE_BATTLEMAGE,
> };
>
> enum xe_subplatform {
>diff --git a/include/drm/xe_pciids.h b/include/drm/xe_pciids.h
>index c7fc288dacee..73d972a8aca1 100644
>--- a/include/drm/xe_pciids.h
>+++ b/include/drm/xe_pciids.h
>@@ -208,4 +208,11 @@
> 	MACRO__(0x64A0, ## __VA_ARGS__), \
> 	MACRO__(0x64B0, ## __VA_ARGS__)
>
>+#define XE_BMG_IDS(MACRO__, ...) \
>+	MACRO__(0xE202, ## __VA_ARGS__), \
>+	MACRO__(0xE20B, ## __VA_ARGS__), \
>+	MACRO__(0xE20C, ## __VA_ARGS__), \
>+	MACRO__(0xE20D, ## __VA_ARGS__), \
>+	MACRO__(0xE212, ## __VA_ARGS__)

I see that in LNL we tied together the PCI ID addition with the platform
addition.... but I wonder if it wouldn't be better to stop doing that,
so we first add the platform and keep it not binding to the driver until
it's more or less in working condition.

Lucas De Marchi


More information about the Intel-xe mailing list