Skip to content

Commit 2e3c369

Browse files
committed
drm/i915/mtl: Eliminate subplatforms
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
1 parent 81af8ab commit 2e3c369

4 files changed

Lines changed: 3 additions & 30 deletions

File tree

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,6 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
573573
#define IS_PONTEVECCHIO(i915) IS_PLATFORM(i915, INTEL_PONTEVECCHIO)
574574
#define IS_METEORLAKE(i915) IS_PLATFORM(i915, INTEL_METEORLAKE)
575575

576-
#define IS_METEORLAKE_M(i915) \
577-
IS_SUBPLATFORM(i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_M)
578-
#define IS_METEORLAKE_P(i915) \
579-
IS_SUBPLATFORM(i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_P)
580576
#define IS_DG2_G10(i915) \
581577
IS_SUBPLATFORM(i915, INTEL_DG2, INTEL_SUBPLATFORM_G10)
582578
#define IS_DG2_G11(i915) \

drivers/gpu/drm/i915/intel_device_info.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,6 @@ static const u16 subplatform_g12_ids[] = {
206206
INTEL_DG2_G12_IDS(0),
207207
};
208208

209-
static const u16 subplatform_m_ids[] = {
210-
INTEL_MTL_M_IDS(0),
211-
};
212-
213-
static const u16 subplatform_p_ids[] = {
214-
INTEL_MTL_P_IDS(0),
215-
};
216-
217209
static bool find_devid(u16 id, const u16 *p, unsigned int num)
218210
{
219211
for (; num; num--, p++) {
@@ -275,12 +267,6 @@ static void intel_device_info_subplatform_init(struct drm_i915_private *i915)
275267
} else if (find_devid(devid, subplatform_g12_ids,
276268
ARRAY_SIZE(subplatform_g12_ids))) {
277269
mask = BIT(INTEL_SUBPLATFORM_G12);
278-
} else if (find_devid(devid, subplatform_m_ids,
279-
ARRAY_SIZE(subplatform_m_ids))) {
280-
mask = BIT(INTEL_SUBPLATFORM_M);
281-
} else if (find_devid(devid, subplatform_p_ids,
282-
ARRAY_SIZE(subplatform_p_ids))) {
283-
mask = BIT(INTEL_SUBPLATFORM_P);
284270
}
285271

286272
GEM_BUG_ON(mask & ~INTEL_SUBPLATFORM_MASK);

drivers/gpu/drm/i915/intel_device_info.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ enum intel_platform {
129129
#define INTEL_SUBPLATFORM_N 1
130130
#define INTEL_SUBPLATFORM_RPLU 2
131131

132-
/* MTL */
133-
#define INTEL_SUBPLATFORM_M 0
134-
#define INTEL_SUBPLATFORM_P 1
135-
136132
enum intel_ppgtt_type {
137133
INTEL_PPGTT_NONE = I915_GEM_PPGTT_NONE,
138134
INTEL_PPGTT_ALIASING = I915_GEM_PPGTT_ALIASING,

include/drm/i915_pciids.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -738,18 +738,13 @@
738738
#define INTEL_ATS_M_IDS(info) \
739739
INTEL_ATS_M150_IDS(info), \
740740
INTEL_ATS_M75_IDS(info)
741+
741742
/* MTL */
742-
#define INTEL_MTL_M_IDS(info) \
743+
#define INTEL_MTL_IDS(info) \
743744
INTEL_VGA_DEVICE(0x7D40, info), \
744-
INTEL_VGA_DEVICE(0x7D60, info)
745-
746-
#define INTEL_MTL_P_IDS(info) \
747745
INTEL_VGA_DEVICE(0x7D45, info), \
748746
INTEL_VGA_DEVICE(0x7D55, info), \
747+
INTEL_VGA_DEVICE(0x7D60, info), \
749748
INTEL_VGA_DEVICE(0x7DD5, info)
750749

751-
#define INTEL_MTL_IDS(info) \
752-
INTEL_MTL_M_IDS(info), \
753-
INTEL_MTL_P_IDS(info)
754-
755750
#endif /* _I915_PCIIDS_H */

0 commit comments

Comments
 (0)