From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> The BXT DUNIT register tells us the size of each DRAM device in Gb. We want to report the size of the whole DIMM in GB, so that it matches how we report it for non-LP platforms. Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/i915_drv.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 1f4a966a9727..c40a738dabd3 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1322,7 +1322,14 @@ bxt_get_dram_info(struct drm_i915_private *dev_priv) width = bxt_get_dimm_width(val); ranks = bxt_get_dimm_ranks(val); - DRM_DEBUG_KMS("CH%d DIMM size: % dGB, width: X%d, ranks:%d\n", + /* + * Size in register is Gb per DRAM device. + * Convert to total GB to match the way + * we report this for non-LP platforms. + */ + size = size * ranks * 8 / (width ?: 1); + + DRM_DEBUG_KMS("CH%d DIMM size: %d GB, width: X%d, ranks: %d\n", i - BXT_D_CR_DRP0_DUNIT_START, size, width, ranks); -- 2.19.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx