]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/mtl: Eliminate subplatforms
authorMatt Roper <matthew.d.roper@intel.com>
Mon, 21 Aug 2023 18:06:27 +0000 (11:06 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 21 Aug 2023 23:56:14 +0000 (16:56 -0700)
Now that we properly match the Xe_LPG IP versions associated with
various workarounds, there's no longer any need to define separate MTL
subplatform in the driver.  Nothing in the code is conditional on MTL-M
or MTL-P base platforms.  Furthermore, I'm not sure the "M" and "P"
designations are even an accurate representation of which specific
platforms would have which IP versions; those were mostly just
placeholders from a long time ago.  The reality is that the IP version
present on a platform gets read from a fuse register at driver init; we
shouldn't be trying to guess which IP is present based on PCI ID
anymore.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Nemesa Garg <nemesa.garg@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230821180619.650007-18-matthew.d.roper@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_device_info.c
drivers/gpu/drm/i915/intel_device_info.h
include/drm/i915_pciids.h

index 75c5fb57935c26d60a7cdb8e6ed90d211e7da545..b08026cd4f405138e1a27dba4a2c83a1795c76b4 100644 (file)
@@ -573,10 +573,6 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define IS_PONTEVECCHIO(i915) IS_PLATFORM(i915, INTEL_PONTEVECCHIO)
 #define IS_METEORLAKE(i915) IS_PLATFORM(i915, INTEL_METEORLAKE)
 
-#define IS_METEORLAKE_M(i915) \
-       IS_SUBPLATFORM(i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_M)
-#define IS_METEORLAKE_P(i915) \
-       IS_SUBPLATFORM(i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_P)
 #define IS_DG2_G10(i915) \
        IS_SUBPLATFORM(i915, INTEL_DG2, INTEL_SUBPLATFORM_G10)
 #define IS_DG2_G11(i915) \
index ea0ec6174ce50cfc845e8a5c09be9ce93733e974..9dfa680a4c62366c5c10f3a39171d0ef1613d913 100644 (file)
@@ -206,14 +206,6 @@ static const u16 subplatform_g12_ids[] = {
        INTEL_DG2_G12_IDS(0),
 };
 
-static const u16 subplatform_m_ids[] = {
-       INTEL_MTL_M_IDS(0),
-};
-
-static const u16 subplatform_p_ids[] = {
-       INTEL_MTL_P_IDS(0),
-};
-
 static bool find_devid(u16 id, const u16 *p, unsigned int num)
 {
        for (; num; num--, p++) {
@@ -275,12 +267,6 @@ static void intel_device_info_subplatform_init(struct drm_i915_private *i915)
        } else if (find_devid(devid, subplatform_g12_ids,
                              ARRAY_SIZE(subplatform_g12_ids))) {
                mask = BIT(INTEL_SUBPLATFORM_G12);
-       } else if (find_devid(devid, subplatform_m_ids,
-                             ARRAY_SIZE(subplatform_m_ids))) {
-               mask = BIT(INTEL_SUBPLATFORM_M);
-       } else if (find_devid(devid, subplatform_p_ids,
-                             ARRAY_SIZE(subplatform_p_ids))) {
-               mask = BIT(INTEL_SUBPLATFORM_P);
        }
 
        GEM_BUG_ON(mask & ~INTEL_SUBPLATFORM_MASK);
index dbfe6443457b5df15113dd8bb12f91dc528f01bf..2ca54417d19b5109d92c7ad2356e405c8c16482d 100644 (file)
@@ -129,10 +129,6 @@ enum intel_platform {
 #define INTEL_SUBPLATFORM_N    1
 #define INTEL_SUBPLATFORM_RPLU  2
 
-/* MTL */
-#define INTEL_SUBPLATFORM_M    0
-#define INTEL_SUBPLATFORM_P    1
-
 enum intel_ppgtt_type {
        INTEL_PPGTT_NONE = I915_GEM_PPGTT_NONE,
        INTEL_PPGTT_ALIASING = I915_GEM_PPGTT_ALIASING,
index e1e10dfbb661324a435d33f7600717c83d2c6a84..38dae757d1a8d5db5b8d899e14ad823f16cc1328 100644 (file)
 #define INTEL_ATS_M_IDS(info) \
        INTEL_ATS_M150_IDS(info), \
        INTEL_ATS_M75_IDS(info)
+
 /* MTL */
-#define INTEL_MTL_M_IDS(info) \
+#define INTEL_MTL_IDS(info) \
        INTEL_VGA_DEVICE(0x7D40, info), \
-       INTEL_VGA_DEVICE(0x7D60, info)
-
-#define INTEL_MTL_P_IDS(info) \
        INTEL_VGA_DEVICE(0x7D45, info), \
        INTEL_VGA_DEVICE(0x7D55, info), \
+       INTEL_VGA_DEVICE(0x7D60, info), \
        INTEL_VGA_DEVICE(0x7DD5, info)
 
-#define INTEL_MTL_IDS(info) \
-       INTEL_MTL_M_IDS(info), \
-       INTEL_MTL_P_IDS(info)
-
 #endif /* _I915_PCIIDS_H */