From: Gustavo Sousa Date: Mon, 18 May 2026 16:14:00 +0000 (-0300) Subject: drm/i915/bw: Don't call intel_dram_info() too early X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c0e9814b427abe382ac4d7bc444fcd03f4e7610;p=thirdparty%2Fkernel%2Flinux.git drm/i915/bw: Don't call intel_dram_info() too early If we end-up bailing early from intel_bw_init_hw() due to !HAS_DISPLAY(display), the call to intel_dram_info() to initialize dram_info will be meaningless. Move the call to be done after that check. Reviewed-by: Jani Nikula Link: https://patch.msgid.link/20260518-separate-platform-from-diplay-ip-specific-bw-params-v4-1-918528006549@intel.com Signed-off-by: Gustavo Sousa --- diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c index 9c3a9bbb49f66..7eef693b51ad9 100644 --- a/drivers/gpu/drm/i915/display/intel_bw.c +++ b/drivers/gpu/drm/i915/display/intel_bw.c @@ -791,11 +791,13 @@ static unsigned int icl_qgv_bw(struct intel_display *display, void intel_bw_init_hw(struct intel_display *display) { - const struct dram_info *dram_info = intel_dram_info(display); + const struct dram_info *dram_info; if (!HAS_DISPLAY(display)) return; + dram_info = intel_dram_info(display); + /* * Starting with Xe3p_LPD, the hardware tells us whether memory has ECC * enabled that would impact display bandwidth. However, so far there