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

Jani Nikula jani.nikula at intel.com
Wed Aug 6 13:52:06 UTC 2025


On Tue, 05 Aug 2025, Rodrigo Vivi <rodrigo.vivi at intel.com> wrote:
> 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.

Is this enough amendmend for the commit message:

"""
This is in preparation for unifying the pre-gen9 handling in dram info.

DG2 remains a special case as described in commit 5eb6bf0b44e7
("drm/i915/dg2: Don't read DRAM info").
"""

Or do you want more?

BR,
Jani.

>> 
>> 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
>> 

-- 
Jani Nikula, Intel


More information about the Intel-xe mailing list