drm/i915/adl-n: Enable ADL-N platform
authorjsg <jsg@openbsd.org>
Wed, 4 May 2022 05:25:28 +0000 (05:25 +0000)
committerjsg <jsg@openbsd.org>
Wed, 4 May 2022 05:25:28 +0000 (05:25 +0000)
From Tejas Upadhyay
7e28d0b26759846485978ada860ef4a427e06c8f in mainline linux

sys/dev/pci/drm/i915/i915_drv.h
sys/dev/pci/drm/i915/i915_pci.c
sys/dev/pci/drm/i915/intel_device_info.c
sys/dev/pci/drm/i915/intel_device_info.h
sys/dev/pci/drm/include/drm/i915_pciids.h

index f46df5b..33f46d8 100644 (file)
@@ -1528,6 +1528,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
        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_ADLP_N(dev_priv) \
+       IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_N)
 #define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \
                                    (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00)
 #define IS_BDW_ULT(dev_priv) \
index aa70960..708d702 100644 (file)
@@ -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_ADLN_IDS(&adl_p_info),
        INTEL_RPLS_IDS(&adl_s_info),
        {0, 0, 0}
 };
index dc479c7..cb55cdb 100644 (file)
@@ -177,6 +177,10 @@ static const u16 subplatform_portf_ids[] = {
        INTEL_ICL_PORT_F_IDS(0),
 };
 
+static const u16 subplatform_n_ids[] = {
+       INTEL_ADLN_IDS(0),
+};
+
 static const u16 subplatform_rpls_ids[] = {
        INTEL_RPLS_IDS(0),
 };
@@ -217,6 +221,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_n_ids,
+                               ARRAY_SIZE(subplatform_n_ids))) {
+               mask = BIT(INTEL_SUBPLATFORM_N);
        } else if (find_devid(devid, subplatform_rpls_ids,
                              ARRAY_SIZE(subplatform_rpls_ids))) {
                mask = BIT(INTEL_SUBPLATFORM_RPL_S);
index 23c9d34..359825e 100644 (file)
@@ -113,6 +113,9 @@ enum intel_platform {
 /* ADL-S */
 #define INTEL_SUBPLATFORM_RPL_S        0
 
+/* ADL-P */
+#define INTEL_SUBPLATFORM_N    0
+
 enum intel_ppgtt_type {
        INTEL_PPGTT_NONE = I915_GEM_PPGTT_NONE,
        INTEL_PPGTT_ALIASING = I915_GEM_PPGTT_ALIASING,
index baf3d1d..533890d 100644 (file)
        INTEL_VGA_DEVICE(0x46C2, info), \
        INTEL_VGA_DEVICE(0x46C3, info)
 
+/* ADL-N */
+#define INTEL_ADLN_IDS(info) \
+       INTEL_VGA_DEVICE(0x46D0, info), \
+       INTEL_VGA_DEVICE(0x46D1, info), \
+       INTEL_VGA_DEVICE(0x46D2, info)
+
 /* RPL-S */
 #define INTEL_RPLS_IDS(info) \
        INTEL_VGA_DEVICE(0xA780, info), \