[PATCH 4/5] drm/i915/dram: bypass fsb/mem freq detection on dg2 and no display

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Aug 5 22:24:33 UTC 2025


On Thu, Jul 31, 2025 at 05:21:24PM +0300, Jani Nikula wrote:
> Non-display now calls the intel_fsb_freq() and intel_mem_freq()
> functions, so we don't have to have the frequencies initialized for dg2
> or non-display cases.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>  drivers/gpu/drm/i915/soc/intel_dram.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
> index 193e7f71a356..d896fb67270f 100644
> --- a/drivers/gpu/drm/i915/soc/intel_dram.c
> +++ b/drivers/gpu/drm/i915/soc/intel_dram.c
> @@ -725,10 +725,13 @@ int intel_dram_detect(struct drm_i915_private *i915)
>  	struct dram_info *dram_info;
>  	int ret;
>  
> +	if (IS_DG2(i915) || !HAS_DISPLAY(i915))
> +		return 0;
> +
>  	detect_fsb_freq(i915);
>  	detect_mem_freq(i915);

but they will only be set to zero no? do we really need to avoid it?
if so, perhaps make this change earlier?

Also I wonder what's special in DG2, but not in BMG...

>  
> -	if (GRAPHICS_VER(i915) < 9 || IS_DG2(i915) || !HAS_DISPLAY(i915))
> +	if (GRAPHICS_VER(i915) < 9)

what about the old gen remaining here? at least deserves a comment on why
it needs the upper calls, but not the call bellow? or should the upper
calls be in another function/flow?

>  		return 0;
>  
>  	dram_info = drmm_kzalloc(&i915->drm, sizeof(*dram_info), GFP_KERNEL);
> -- 
> 2.39.5
> 


More information about the Intel-gfx mailing list