Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/dram: Consolidate logging of DRAM type

Instead of logging the dram type in the per version/platform function,
do it in the generic one. This fixes a few discrepancies depending on
the platform:

- There was no DRAM type logging for graphics version 12 and
above
- For graphics version 11, it would log the DRAM type in
skl_get_dram_info(), but could possibly override it later
without any log in icl_pcode_read_mem_global_info()

For bxt_get_dram_info(), there's no need to log the type for each dimm,
as the drm_WARN_ON() already covers the case they are not all the same.

This maintains the behavior of skl_get_dram_info() that would log the
DRAM type even on failures.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20250324-dram-type-v1-2-bf60ef33ac01@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

+6 -5
+6 -5
drivers/gpu/drm/i915/soc/intel_dram.c
··· 450 450 int ret; 451 451 452 452 dram_info->type = skl_get_dram_type(i915); 453 - drm_dbg_kms(&i915->drm, "DRAM type: %s\n", 454 - intel_dram_type_str(dram_info->type)); 455 453 456 454 ret = skl_dram_get_channels_info(i915); 457 455 if (ret) ··· 564 566 dram_info->type != type); 565 567 566 568 drm_dbg_kms(&i915->drm, 567 - "CH%u DIMM size: %u Gb, width: X%u, ranks: %u, type: %s\n", 569 + "CH%u DIMM size: %u Gb, width: X%u, ranks: %u\n", 568 570 i - BXT_D_CR_DRP0_DUNIT_START, 569 - dimm.size, dimm.width, dimm.ranks, 570 - intel_dram_type_str(type)); 571 + dimm.size, dimm.width, dimm.ranks); 571 572 572 573 if (valid_ranks == 0) 573 574 valid_ranks = dimm.ranks; ··· 733 736 ret = bxt_get_dram_info(i915); 734 737 else 735 738 ret = skl_get_dram_info(i915); 739 + 740 + drm_dbg_kms(&i915->drm, "DRAM type: %s\n", 741 + intel_dram_type_str(dram_info->type)); 742 + 736 743 if (ret) 737 744 return; 738 745