Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH 4/8] drm/i915/dram: s/wm_lv0.../has_16gb_dimms/
Date: Tue,  2 Sep 2025 16:31:09 +0300	[thread overview]
Message-ID: <20250902133113.18778-5-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20250902133113.18778-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The DRAM code shouldn't know anything about watermarks. Rename
wm_lv_0_adjust_needed to has_16gb_dimms. How this gets used is
up to the watermark code.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/skl_watermark.c |  2 +-
 drivers/gpu/drm/i915/soc/intel_dram.c        | 12 ++++++------
 drivers/gpu/drm/i915/soc/intel_dram.h        |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index 33885d619a97..ae3ce0d65cfc 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -3214,7 +3214,7 @@ adjust_wm_latency(struct intel_display *display,
 	 * any underrun. If not able to get Dimm info assume 16GB dimm
 	 * to avoid any underrun.
 	 */
-	if (!display->platform.dg2 && dram_info->wm_lv_0_adjust_needed)
+	if (!display->platform.dg2 && dram_info->has_16gb_dimms)
 		wm[0] += 1;
 }
 
diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
index b4f0793f778d..efb72e137748 100644
--- a/drivers/gpu/drm/i915/soc/intel_dram.c
+++ b/drivers/gpu/drm/i915/soc/intel_dram.c
@@ -428,7 +428,7 @@ skl_dram_get_channels_info(struct drm_i915_private *i915, struct dram_info *dram
 		return -EINVAL;
 	}
 
-	dram_info->wm_lv_0_adjust_needed = ch0.is_16gb_dimm || ch1.is_16gb_dimm;
+	dram_info->has_16gb_dimms = ch0.is_16gb_dimm || ch1.is_16gb_dimm;
 
 	dram_info->symmetric_memory = intel_is_dram_symmetric(&ch0, &ch1);
 
@@ -673,7 +673,7 @@ static int gen11_get_dram_info(struct drm_i915_private *i915, struct dram_info *
 
 static int gen12_get_dram_info(struct drm_i915_private *i915, struct dram_info *dram_info)
 {
-	dram_info->wm_lv_0_adjust_needed = false;
+	dram_info->has_16gb_dimms = false;
 
 	return icl_pcode_read_mem_global_info(i915, dram_info);
 }
@@ -737,10 +737,10 @@ int intel_dram_detect(struct drm_i915_private *i915)
 	i915->dram_info = dram_info;
 
 	/*
-	 * Assume level 0 watermark latency adjustment is needed until proven
+	 * Assume 16Gb DIMMs are present until proven
 	 * otherwise, this w/a is not needed by bxt/glk.
 	 */
-	dram_info->wm_lv_0_adjust_needed = !IS_BROXTON(i915) && !IS_GEMINILAKE(i915);
+	dram_info->has_16gb_dimms = !IS_BROXTON(i915) && !IS_GEMINILAKE(i915);
 
 	if (DISPLAY_VER(display) >= 14)
 		ret = xelpdp_get_dram_info(i915, dram_info);
@@ -766,8 +766,8 @@ int intel_dram_detect(struct drm_i915_private *i915)
 
 	drm_dbg_kms(&i915->drm, "DRAM channels: %u\n", dram_info->num_channels);
 
-	drm_dbg_kms(&i915->drm, "Watermark level 0 adjustment needed: %s\n",
-		    str_yes_no(dram_info->wm_lv_0_adjust_needed));
+	drm_dbg_kms(&i915->drm, "16Gb DIMMs: %s\n",
+		    str_yes_no(dram_info->has_16gb_dimms));
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/i915/soc/intel_dram.h b/drivers/gpu/drm/i915/soc/intel_dram.h
index 6212944d44aa..03a973f1c941 100644
--- a/drivers/gpu/drm/i915/soc/intel_dram.h
+++ b/drivers/gpu/drm/i915/soc/intel_dram.h
@@ -31,7 +31,7 @@ struct dram_info {
 	u8 num_qgv_points;
 	u8 num_psf_gv_points;
 	bool symmetric_memory;
-	bool wm_lv_0_adjust_needed;
+	bool has_16gb_dimms;
 };
 
 void intel_dram_edram_detect(struct drm_i915_private *i915);
-- 
2.49.1


  parent reply	other threads:[~2025-09-02 13:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 13:31 [PATCH 0/8] drm/i915/dram: DRAM detection stuff Ville Syrjala
2025-09-02 13:31 ` [PATCH 1/8] drm/i915/dram: Populate PNV memory type accurately Ville Syrjala
2025-09-02 13:45   ` Jani Nikula
2025-09-02 13:31 ` [PATCH 2/8] drm/i915/dram: Use intel_dram_type_str() for pnv Ville Syrjala
2025-09-02 13:46   ` Jani Nikula
2025-09-02 13:31 ` [PATCH 3/8] drm/i915/dram: Pack dram_info better Ville Syrjala
2025-09-02 13:46   ` Jani Nikula
2025-09-02 13:31 ` Ville Syrjala [this message]
2025-09-05  9:56   ` [PATCH 4/8] drm/i915/dram: s/wm_lv0.../has_16gb_dimms/ Jani Nikula
2025-09-02 13:31 ` [PATCH 5/8] drm/i915/dram: Move 16Gb DIMM detection fully to the skl/icl codepaths Ville Syrjala
2025-09-02 13:56   ` Jani Nikula
2025-09-02 14:18     ` Ville Syrjälä
2025-09-02 14:21       ` Jani Nikula
2025-09-02 13:31 ` [PATCH 6/8] drm/i915/dram: Fix some spelling aroynd the 16Gb DIMM w/a Ville Syrjala
2025-09-02 13:58   ` Jani Nikula
2025-09-02 14:03   ` Jani Nikula
2025-09-02 13:31 ` [PATCH 7/8] drm/i915/dram: Don't call skl_get_dram_info()/skl_get_dram_type() on icl Ville Syrjala
2025-09-02 14:02   ` Jani Nikula
2025-09-02 13:31 ` [PATCH 8/8] drm/i915/dram: Print memory details even if something went wrong Ville Syrjala
2025-09-02 14:03   ` Jani Nikula
2025-09-02 17:15 ` ✓ i915.CI.BAT: success for drm/i915/dram: DRAM detection stuff Patchwork
2025-09-03  1:34 ` ✗ i915.CI.Full: failure " Patchwork

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=20250902133113.18778-5-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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