]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915: Apply the 16Gb DIMM w/a only for the platforms that need it
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 19 Sep 2025 19:29:49 +0000 (22:29 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 23 Sep 2025 15:09:21 +0000 (18:09 +0300)
Currently the code assumes that every platform except dg2 need the
16Gb DIMM w/a, while in reality it's only needed by skl and icl (and
derivatives). Switch to a more specific platform check.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250919193000.17665-3-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/skl_watermark.c

index 83ec42646e8260cb9efcde950a63a21c43f003eb..2bf334fe63c98f815e0685b6e8275841b01b23c1 100644 (file)
@@ -3174,11 +3174,19 @@ void skl_watermark_ipc_init(struct intel_display *display)
        skl_watermark_ipc_update(display);
 }
 
+static bool need_16gb_dimm_wa(struct intel_display *display)
+{
+       const struct dram_info *dram_info = intel_dram_info(display->drm);
+
+       return (display->platform.skylake || display->platform.kabylake ||
+               display->platform.coffeelake || display->platform.cometlake ||
+               DISPLAY_VER(display) == 11) && dram_info->has_16gb_dimms;
+}
+
 static void
 adjust_wm_latency(struct intel_display *display,
                  u16 wm[], int num_levels, int read_latency)
 {
-       const struct dram_info *dram_info = intel_dram_info(display->drm);
        int i, level;
 
        /*
@@ -3214,7 +3222,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->has_16gb_dimms)
+       if (need_16gb_dimm_wa(display))
                wm[0] += 1;
 }