Re: [PATCH v4] platform/x86/amd/pmc: adjust getting DRAM size behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ilpo,

On 11/17/2023 3:41 PM, Ilpo Järvinen wrote:
> On Thu, 16 Nov 2023, Shyam Sundar S K wrote:
> 
>> amd_pmc_get_dram_size() is used to get the DRAM size information. But in
>> the current code, mailbox command to get the DRAM size info is sent based
>> on the values of dev->major and dev->minor.
>>
>> But dev->major and dev->minor will have either junk or zero assigned to
>> them until at least once a call to amd_pmc_get_smu_version() is made which
>> ideally populates dev->major and dev->minor.
>>
>> Ideally to suffice this, adding a amd_pmc_get_smu_version() call to
>> amd_pmc_get_dram_size() would solve, but that has a downside of elevating
>> the boot times.
>>
>> After talking to the PMFW team, its understood that the "get dram size"
>> mbox command would only be supported on specific platforms (like Mendocino)
>> and not all. So, adjust getting DRAM size behavior such that,
>>
>> - if that's Rembrandt or Mendocino and the underlying PMFW knows how
>> to execute the "get dram size" command it shall give the custom dram size.
>>
>> - if the underlying FW does not report the dram size, we just proceed
>> further and assign the default dram size.
>>
>> Simplest way to address this is to remove amd_pmc_get_dram_size() function
>> and directly call the "get dram size" command in the amd_pmc_s2d_init().
>>
>> Reported-by: Mark Hasemeyer <markhas@xxxxxxxxxxxx>
>> Closes: https://lore.kernel.org/platform-driver-x86/3b224c62-a1d8-41bd-aced-5825f5f20e66@xxxxxxx/
>> Fixes: be8325fb3d8c ("platform/x86/amd: pmc: Get STB DRAM size from PMFW")
>> Suggested-by: Sanket Goswami <Sanket.Goswami@xxxxxxx>
>> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>
>> ---
>> v4:
>> - Based on review-ilpo branch (tip commit: 94ace9eda882)
>> - Add Mark as "Reported-by:"
>> - Add more commit log notes.
> 
> Thank, applied now to review-ilpo branch. I had to reflow your commit 
> message because the lines were too long (try to remain within 72 
> characters in the future). I also made other minor adjustments to the 
> commit message.
> 
> 

Thank you for the rewords :-)

on the commit message part, you prefer 72 or 75 characters?

Because I did use, checkpatch with "--strict" and did not find it
complaining.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/checkpatch.pl?h=v6.7-rc2#n3275

Thanks,
Shyam



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux