mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-10 22:59:03 -04:00
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: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20250324-dram-type-v1-1-bf60ef33ac01@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user