Skip to content

Commit 4134390

Browse files
committed
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>
1 parent 3a64c19 commit 4134390

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/gpu/drm/i915/display/i9xx_wm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ static const struct cxsr_latency *pnv_get_cxsr_latency(struct intel_display *dis
105105
}
106106

107107
drm_dbg_kms(display->drm,
108-
"Could not find CxSR latency for DDR%s, FSB %u kHz, MEM %u kHz\n",
109-
is_ddr3 ? "3" : "2", dram_info->fsb_freq, dram_info->mem_freq);
108+
"Could not find CxSR latency for %s, FSB %u kHz, MEM %u kHz\n",
109+
intel_dram_type_str(dram_info->type),
110+
dram_info->fsb_freq, dram_info->mem_freq);
110111

111112
return NULL;
112113
}

drivers/gpu/drm/i915/soc/intel_dram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct dram_channel_info {
3131

3232
#define DRAM_TYPE_STR(type) [INTEL_DRAM_ ## type] = #type
3333

34-
static const char *intel_dram_type_str(enum intel_dram_type type)
34+
const char *intel_dram_type_str(enum intel_dram_type type)
3535
{
3636
static const char * const str[] = {
3737
DRAM_TYPE_STR(UNKNOWN),

drivers/gpu/drm/i915/soc/intel_dram.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ int intel_dram_detect(struct drm_i915_private *i915);
3939
unsigned int intel_fsb_freq(struct drm_i915_private *i915);
4040
unsigned int intel_mem_freq(struct drm_i915_private *i915);
4141
const struct dram_info *intel_dram_info(struct drm_device *drm);
42+
const char *intel_dram_type_str(enum intel_dram_type type);
4243

4344
#endif /* __INTEL_DRAM_H__ */

0 commit comments

Comments
 (0)