From 1dae0cf48afba75e7d0b4dd5509592bfd8f71506 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 4 May 2022 05:20:33 +0000 Subject: [PATCH] drm/i915/rpl-s: Add PCI IDS for Raptor Lake S From Anusha Srivatsa 52407c220c44c8dcc6aa8aa35ffc8a2db3c849a9 in mainline linux --- sys/dev/pci/drm/i915/i915_drv.h | 2 ++ sys/dev/pci/drm/i915/i915_pci.c | 1 + sys/dev/pci/drm/i915/intel_device_info.c | 7 +++++++ sys/dev/pci/drm/i915/intel_device_info.h | 3 +++ sys/dev/pci/drm/include/drm/i915_pciids.h | 9 +++++++++ 5 files changed, 22 insertions(+) diff --git a/sys/dev/pci/drm/i915/i915_drv.h b/sys/dev/pci/drm/i915/i915_drv.h index ee179114c3b..f46df5b4aa0 100644 --- a/sys/dev/pci/drm/i915/i915_drv.h +++ b/sys/dev/pci/drm/i915/i915_drv.h @@ -1526,6 +1526,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, IS_SUBPLATFORM(dev_priv, INTEL_DG2, INTEL_SUBPLATFORM_G10) #define IS_DG2_G11(dev_priv) \ IS_SUBPLATFORM(dev_priv, INTEL_DG2, INTEL_SUBPLATFORM_G11) +#define IS_ADLS_RPLS(dev_priv) \ + IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_S, INTEL_SUBPLATFORM_RPL_S) #define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \ (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00) #define IS_BDW_ULT(dev_priv) \ diff --git a/sys/dev/pci/drm/i915/i915_pci.c b/sys/dev/pci/drm/i915/i915_pci.c index de6fd50400c..aa7096030f9 100644 --- a/sys/dev/pci/drm/i915/i915_pci.c +++ b/sys/dev/pci/drm/i915/i915_pci.c @@ -1115,6 +1115,7 @@ const struct pci_device_id pciidlist[] = { INTEL_RKL_IDS(&rkl_info), INTEL_ADLS_IDS(&adl_s_info), INTEL_ADLP_IDS(&adl_p_info), + INTEL_RPLS_IDS(&adl_s_info), {0, 0, 0} }; MODULE_DEVICE_TABLE(pci, pciidlist); diff --git a/sys/dev/pci/drm/i915/intel_device_info.c b/sys/dev/pci/drm/i915/intel_device_info.c index b82e4125354..dc479c784de 100644 --- a/sys/dev/pci/drm/i915/intel_device_info.c +++ b/sys/dev/pci/drm/i915/intel_device_info.c @@ -177,6 +177,10 @@ static const u16 subplatform_portf_ids[] = { INTEL_ICL_PORT_F_IDS(0), }; +static const u16 subplatform_rpls_ids[] = { + INTEL_RPLS_IDS(0), +}; + static bool find_devid(u16 id, const u16 *p, unsigned int num) { for (; num; num--, p++) { @@ -213,6 +217,9 @@ void intel_device_info_subplatform_init(struct drm_i915_private *i915) } else if (find_devid(devid, subplatform_portf_ids, ARRAY_SIZE(subplatform_portf_ids))) { mask = BIT(INTEL_SUBPLATFORM_PORTF); + } else if (find_devid(devid, subplatform_rpls_ids, + ARRAY_SIZE(subplatform_rpls_ids))) { + mask = BIT(INTEL_SUBPLATFORM_RPL_S); } if (IS_TIGERLAKE(i915)) { diff --git a/sys/dev/pci/drm/i915/intel_device_info.h b/sys/dev/pci/drm/i915/intel_device_info.h index d328bb95c49..23c9d34a2f5 100644 --- a/sys/dev/pci/drm/i915/intel_device_info.h +++ b/sys/dev/pci/drm/i915/intel_device_info.h @@ -110,6 +110,9 @@ enum intel_platform { #define INTEL_SUBPLATFORM_G10 0 #define INTEL_SUBPLATFORM_G11 1 +/* ADL-S */ +#define INTEL_SUBPLATFORM_RPL_S 0 + enum intel_ppgtt_type { INTEL_PPGTT_NONE = I915_GEM_PPGTT_NONE, INTEL_PPGTT_ALIASING = I915_GEM_PPGTT_ALIASING, diff --git a/sys/dev/pci/drm/include/drm/i915_pciids.h b/sys/dev/pci/drm/include/drm/i915_pciids.h index c00ac54692d..baf3d1d3d56 100644 --- a/sys/dev/pci/drm/include/drm/i915_pciids.h +++ b/sys/dev/pci/drm/include/drm/i915_pciids.h @@ -666,4 +666,13 @@ INTEL_VGA_DEVICE(0x46C2, info), \ INTEL_VGA_DEVICE(0x46C3, info) +/* RPL-S */ +#define INTEL_RPLS_IDS(info) \ + INTEL_VGA_DEVICE(0xA780, info), \ + INTEL_VGA_DEVICE(0xA781, info), \ + INTEL_VGA_DEVICE(0xA782, info), \ + INTEL_VGA_DEVICE(0xA783, info), \ + INTEL_VGA_DEVICE(0xA788, info), \ + INTEL_VGA_DEVICE(0xA789, info) + #endif /* _I915_PCIIDS_H */ -- 2.20.1