From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Matt Roper <matthew.d.roper@intel.com>
Subject: [PATCH 2/2] drm/i915/dram: Consolidate logging of DRAM type
Date: Mon, 24 Mar 2025 19:28:42 -0700 [thread overview]
Message-ID: <20250324-dram-type-v1-2-bf60ef33ac01@intel.com> (raw)
In-Reply-To: <20250324-dram-type-v1-0-bf60ef33ac01@intel.com>
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 the are not all the same.
This maintains the behavior of skl_get_dram_info() that would log the
DRAM type even on failures.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/i915/soc/intel_dram.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
index 39d8520ee621d..eee5c4f45a43c 100644
--- a/drivers/gpu/drm/i915/soc/intel_dram.c
+++ b/drivers/gpu/drm/i915/soc/intel_dram.c
@@ -450,8 +450,6 @@ skl_get_dram_info(struct drm_i915_private *i915)
int ret;
dram_info->type = skl_get_dram_type(i915);
- drm_dbg_kms(&i915->drm, "DRAM type: %s\n",
- intel_dram_type_str(dram_info->type));
ret = skl_dram_get_channels_info(i915);
if (ret)
@@ -566,10 +564,9 @@ static int bxt_get_dram_info(struct drm_i915_private *i915)
dram_info->type != type);
drm_dbg_kms(&i915->drm,
- "CH%u DIMM size: %u Gb, width: X%u, ranks: %u, type: %s\n",
+ "CH%u DIMM size: %u Gb, width: X%u, ranks: %u\n",
i - BXT_D_CR_DRP0_DUNIT_START,
- dimm.size, dimm.width, dimm.ranks,
- intel_dram_type_str(type));
+ dimm.size, dimm.width, dimm.ranks);
if (valid_ranks == 0)
valid_ranks = dimm.ranks;
@@ -736,6 +733,10 @@ void intel_dram_detect(struct drm_i915_private *i915)
ret = bxt_get_dram_info(i915);
else
ret = skl_get_dram_info(i915);
+
+ drm_dbg_kms(&i915->drm, "DRAM type: %s\n",
+ intel_dram_type_str(dram_info->type));
+
if (ret)
return;
--
2.49.0
next prev parent reply other threads:[~2025-03-25 2:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 2:28 [PATCH 0/2] drm/i915: DRAM type logging Lucas De Marchi
2025-03-25 2:28 ` [PATCH 1/2] drm/i915/dram: Add missing INTEL_DRAM str conversions Lucas De Marchi
2025-03-28 22:25 ` Matt Roper
2025-03-25 2:28 ` Lucas De Marchi [this message]
2025-03-28 22:29 ` [PATCH 2/2] drm/i915/dram: Consolidate logging of DRAM type Matt Roper
2025-03-25 2:34 ` ✓ CI.Patch_applied: success for drm/i915: DRAM type logging Patchwork
2025-03-25 2:34 ` ✓ CI.checkpatch: " Patchwork
2025-03-25 2:36 ` ✓ CI.KUnit: " Patchwork
2025-03-25 2:52 ` ✓ CI.Build: " Patchwork
2025-03-25 2:54 ` ✓ CI.Hooks: " Patchwork
2025-03-25 2:56 ` ✗ CI.checksparse: warning " Patchwork
2025-03-25 3:16 ` ✓ Xe.CI.BAT: success " Patchwork
2025-03-31 15:18 ` [PATCH 0/2] " Lucas De Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250324-dram-type-v1-2-bf60ef33ac01@intel.com \
--to=lucas.demarchi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=matthew.d.roper@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox