Commit 8d4bd9bb authored by Lucas De Marchi's avatar Lucas De Marchi
Browse files

drm/i915/dram: Add missing INTEL_DRAM str conversions



Some new dram types were added without adding the corresponding string
conversion, probably because it's not being used by recent platforms.
Add them, together with a BUILD_BUG_ON() to ensure it keeps in sync, in
preparation to make use of them in recent platforms.

Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20250324-dram-type-v1-1-bf60ef33ac01@intel.com


Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent bee964bd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -306,6 +306,7 @@ struct drm_i915_private {
			INTEL_DRAM_LPDDR5,
			INTEL_DRAM_GDDR,
			INTEL_DRAM_GDDR_ECC,
			__INTEL_DRAM_TYPE_MAX,
		} type;
		u8 num_qgv_points;
		u8 num_psf_gv_points;
+6 −0
Original line number Diff line number Diff line
@@ -33,8 +33,14 @@ static const char *intel_dram_type_str(enum intel_dram_type type)
		DRAM_TYPE_STR(DDR4),
		DRAM_TYPE_STR(LPDDR3),
		DRAM_TYPE_STR(LPDDR4),
		DRAM_TYPE_STR(DDR5),
		DRAM_TYPE_STR(LPDDR5),
		DRAM_TYPE_STR(GDDR),
		DRAM_TYPE_STR(GDDR_ECC),
	};

	BUILD_BUG_ON(ARRAY_SIZE(str) != __INTEL_DRAM_TYPE_MAX);

	if (type >= ARRAY_SIZE(str))
		type = INTEL_DRAM_UNKNOWN;

+1 −0
Original line number Diff line number Diff line
@@ -576,6 +576,7 @@ struct xe_device {
			INTEL_DRAM_LPDDR5,
			INTEL_DRAM_GDDR,
			INTEL_DRAM_GDDR_ECC,
			__INTEL_DRAM_TYPE_MAX,
		} type;
		u8 num_qgv_points;
		u8 num_psf_gv_points;