drm/i915/dram: Use intel_dram_type_str() for pnv

Replace the hand rolled PNV memory type printk string
stuff with intel_dram_type_str().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250902133113.18778-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Ville Syrjälä
2025-09-02 16:31:07 +03:00
parent 3a64c19963
commit 413439008c
3 changed files with 5 additions and 3 deletions

View File

@@ -105,8 +105,9 @@ static const struct cxsr_latency *pnv_get_cxsr_latency(struct intel_display *dis
}
drm_dbg_kms(display->drm,
"Could not find CxSR latency for DDR%s, FSB %u kHz, MEM %u kHz\n",
is_ddr3 ? "3" : "2", dram_info->fsb_freq, dram_info->mem_freq);
"Could not find CxSR latency for %s, FSB %u kHz, MEM %u kHz\n",
intel_dram_type_str(dram_info->type),
dram_info->fsb_freq, dram_info->mem_freq);
return NULL;
}

View File

@@ -31,7 +31,7 @@ struct dram_channel_info {
#define DRAM_TYPE_STR(type) [INTEL_DRAM_ ## type] = #type
static const char *intel_dram_type_str(enum intel_dram_type type)
const char *intel_dram_type_str(enum intel_dram_type type)
{
static const char * const str[] = {
DRAM_TYPE_STR(UNKNOWN),

View File

@@ -39,5 +39,6 @@ int intel_dram_detect(struct drm_i915_private *i915);
unsigned int intel_fsb_freq(struct drm_i915_private *i915);
unsigned int intel_mem_freq(struct drm_i915_private *i915);
const struct dram_info *intel_dram_info(struct drm_device *drm);
const char *intel_dram_type_str(enum intel_dram_type type);
#endif /* __INTEL_DRAM_H__ */