mbox series

[0/8] platform/x86/amd/pmc: Updates to AMD PMC driver

Message ID 20230409185348.556161-1-Shyam-sundar.S-k@amd.com (mailing list archive)
Headers show
Series platform/x86/amd/pmc: Updates to AMD PMC driver | expand

Message

Shyam Sundar S K April 9, 2023, 6:53 p.m. UTC
This patch series includes:

1. Fixes to Picasso from Mario
2. Change the SMN pair index for driver probing & STB init
3. New command ID for getting DRAM size from PMFW.
4. Change in smu metrics table data structure.

Mario Limonciello (4):
  platform/x86/amd: pmc: Don't try to read SMU version on Picasso
  platform/x86/amd: pmc: Hide SMU version and program attributes for
    Picasso
  platform/x86/amd: pmc: Don't dump data after resume from s0i3 on
    picasso
  platform/x86/amd: pmc: Move idlemask check into
    `amd_pmc_idlemask_read`

Shyam Sundar S K (4):
  platform/x86/amd: pmc: Utilize SMN index 0 for driver probe
  platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init
  platform/x86/amd: pmc: Get STB DRAM size from PMFW
  platform/x86/amd: pmc: update metrics table info for Pink Sardine

 drivers/platform/x86/amd/Kconfig |   2 +-
 drivers/platform/x86/amd/pmc.c   | 240 ++++++++++++++++++-------------
 2 files changed, 145 insertions(+), 97 deletions(-)

Comments

Hans de Goede April 10, 2023, 10:36 a.m. UTC | #1
Hi Shyam, Mario,

On 4/9/23 20:53, Shyam Sundar S K wrote:
> This patch series includes:
> 
> 1. Fixes to Picasso from Mario
> 2. Change the SMN pair index for driver probing & STB init
> 3. New command ID for getting DRAM size from PMFW.
> 4. Change in smu metrics table data structure.

So patches 1-6 all seem to be bugfixes, but they don't seem
to be very urgent.  At least AFAICT they mostly just fix
some (harmless) warnings getting logged + future proof some
of the code for newer firmware revisions.

Given that rc6 has already been released it would be my
preference to just merge these into linux-next so that they
get merged into Linus tree for 6.4-rc1.

Either way (urgent should go to fixes, or -next is fine)
please let me know how to proceed with merging these.

Regards,

Hans






> 
> Mario Limonciello (4):
>   platform/x86/amd: pmc: Don't try to read SMU version on Picasso
>   platform/x86/amd: pmc: Hide SMU version and program attributes for
>     Picasso
>   platform/x86/amd: pmc: Don't dump data after resume from s0i3 on
>     picasso
>   platform/x86/amd: pmc: Move idlemask check into
>     `amd_pmc_idlemask_read`
> 
> Shyam Sundar S K (4):
>   platform/x86/amd: pmc: Utilize SMN index 0 for driver probe
>   platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init
>   platform/x86/amd: pmc: Get STB DRAM size from PMFW
>   platform/x86/amd: pmc: update metrics table info for Pink Sardine
> 
>  drivers/platform/x86/amd/Kconfig |   2 +-
>  drivers/platform/x86/amd/pmc.c   | 240 ++++++++++++++++++-------------
>  2 files changed, 145 insertions(+), 97 deletions(-)
>
Mario Limonciello April 10, 2023, 4:49 p.m. UTC | #2
[Public]



> -----Original Message-----
> From: Hans de Goede <hdegoede@redhat.com>
> Sent: Monday, April 10, 2023 05:37
> To: S-k, Shyam-sundar <Shyam-sundar.S-k@amd.com>;
> markgross@kernel.org; Limonciello, Mario <Mario.Limonciello@amd.com>
> Cc: Goswami, Sanket <Sanket.Goswami@amd.com>; platform-driver-
> x86@vger.kernel.org
> Subject: Re: [PATCH 0/8] platform/x86/amd/pmc: Updates to AMD PMC
> driver
> 
> Hi Shyam, Mario,
> 
> On 4/9/23 20:53, Shyam Sundar S K wrote:
> > This patch series includes:
> >
> > 1. Fixes to Picasso from Mario
> > 2. Change the SMN pair index for driver probing & STB init
> > 3. New command ID for getting DRAM size from PMFW.
> > 4. Change in smu metrics table data structure.
> 
> So patches 1-6 all seem to be bugfixes, but they don't seem
> to be very urgent.  At least AFAICT they mostly just fix
> some (harmless) warnings getting logged + future proof some
> of the code for newer firmware revisions.
> 
> Given that rc6 has already been released it would be my
> preference to just merge these into linux-next so that they
> get merged into Linus tree for 6.4-rc1.
> 
> Either way (urgent should go to fixes, or -next is fine)
> please let me know how to proceed with merging these.
> 

IMO they can wait for 6.4.  There is a matching change needed
for NVME for the Picasso stuff which isn't landing until 6.4 also.

> Regards,
> 
> Hans
> 
> 
> 
> 
> 
> 
> >
> > Mario Limonciello (4):
> >   platform/x86/amd: pmc: Don't try to read SMU version on Picasso
> >   platform/x86/amd: pmc: Hide SMU version and program attributes for
> >     Picasso
> >   platform/x86/amd: pmc: Don't dump data after resume from s0i3 on
> >     picasso
> >   platform/x86/amd: pmc: Move idlemask check into
> >     `amd_pmc_idlemask_read`
> >
> > Shyam Sundar S K (4):
> >   platform/x86/amd: pmc: Utilize SMN index 0 for driver probe
> >   platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init
> >   platform/x86/amd: pmc: Get STB DRAM size from PMFW
> >   platform/x86/amd: pmc: update metrics table info for Pink Sardine
> >
> >  drivers/platform/x86/amd/Kconfig |   2 +-
> >  drivers/platform/x86/amd/pmc.c   | 240 ++++++++++++++++++-------------
> >  2 files changed, 145 insertions(+), 97 deletions(-)
> >
Shyam Sundar S K April 10, 2023, 5:33 p.m. UTC | #3
Hi Hans,

On 4/10/2023 10:19 PM, Limonciello, Mario wrote:
> [Public]
> 
> 
> 
>> -----Original Message-----
>> From: Hans de Goede <hdegoede@redhat.com>
>> Sent: Monday, April 10, 2023 05:37
>> To: S-k, Shyam-sundar <Shyam-sundar.S-k@amd.com>;
>> markgross@kernel.org; Limonciello, Mario <Mario.Limonciello@amd.com>
>> Cc: Goswami, Sanket <Sanket.Goswami@amd.com>; platform-driver-
>> x86@vger.kernel.org
>> Subject: Re: [PATCH 0/8] platform/x86/amd/pmc: Updates to AMD PMC
>> driver
>>
>> Hi Shyam, Mario,
>>
>> On 4/9/23 20:53, Shyam Sundar S K wrote:
>>> This patch series includes:
>>>
>>> 1. Fixes to Picasso from Mario
>>> 2. Change the SMN pair index for driver probing & STB init
>>> 3. New command ID for getting DRAM size from PMFW.
>>> 4. Change in smu metrics table data structure.
>>
>> So patches 1-6 all seem to be bugfixes, but they don't seem
>> to be very urgent.  At least AFAICT they mostly just fix
>> some (harmless) warnings getting logged + future proof some
>> of the code for newer firmware revisions.
>>
>> Given that rc6 has already been released it would be my
>> preference to just merge these into linux-next so that they
>> get merged into Linus tree for 6.4-rc1.
>>
>> Either way (urgent should go to fixes, or -next is fine)
>> please let me know how to proceed with merging these.
>>
> 
> IMO they can wait for 6.4.  There is a matching change needed
> for NVME for the Picasso stuff which isn't landing until 6.4 also.

Agree with Mario.

Thanks,
Shyam

> 
>> Regards,
>>
>> Hans
>>
>>
>>
>>
>>
>>
>>>
>>> Mario Limonciello (4):
>>>   platform/x86/amd: pmc: Don't try to read SMU version on Picasso
>>>   platform/x86/amd: pmc: Hide SMU version and program attributes for
>>>     Picasso
>>>   platform/x86/amd: pmc: Don't dump data after resume from s0i3 on
>>>     picasso
>>>   platform/x86/amd: pmc: Move idlemask check into
>>>     `amd_pmc_idlemask_read`
>>>
>>> Shyam Sundar S K (4):
>>>   platform/x86/amd: pmc: Utilize SMN index 0 for driver probe
>>>   platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init
>>>   platform/x86/amd: pmc: Get STB DRAM size from PMFW
>>>   platform/x86/amd: pmc: update metrics table info for Pink Sardine
>>>
>>>  drivers/platform/x86/amd/Kconfig |   2 +-
>>>  drivers/platform/x86/amd/pmc.c   | 240 ++++++++++++++++++-------------
>>>  2 files changed, 145 insertions(+), 97 deletions(-)
>>>
Hans de Goede April 11, 2023, 8:40 a.m. UTC | #4
Hi Shyam,

On 4/9/23 20:53, Shyam Sundar S K wrote:
> This patch series includes:
> 
> 1. Fixes to Picasso from Mario
> 2. Change the SMN pair index for driver probing & STB init
> 3. New command ID for getting DRAM size from PMFW.
> 4. Change in smu metrics table data structure.
> 
> Mario Limonciello (4):
>   platform/x86/amd: pmc: Don't try to read SMU version on Picasso
>   platform/x86/amd: pmc: Hide SMU version and program attributes for
>     Picasso
>   platform/x86/amd: pmc: Don't dump data after resume from s0i3 on
>     picasso
>   platform/x86/amd: pmc: Move idlemask check into
>     `amd_pmc_idlemask_read`
> 
> Shyam Sundar S K (4):
>   platform/x86/amd: pmc: Utilize SMN index 0 for driver probe
>   platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init
>   platform/x86/amd: pmc: Get STB DRAM size from PMFW
>   platform/x86/amd: pmc: update metrics table info for Pink Sardine
> 
>  drivers/platform/x86/amd/Kconfig |   2 +-
>  drivers/platform/x86/amd/pmc.c   | 240 ++++++++++++++++++-------------
>  2 files changed, 145 insertions(+), 97 deletions(-)

Thanks for the patches I have merged patches 1-6 into my
review-hans (soon to be for-next) branch now.

I agree with Mario that the firmware version check in 7/8
should look like this:

"""
Is this only for YC and not for PS?

The version check I think you should make it clear it's only intended for this program.

switch(dev->cpu_id) {
case AMD_CPU_ID_YC:
    if (version_check)
        goto err_dram_size;
    break;

default:
    goto err_dram_size;

} 
"""

Since we have seen in earlier patches in this series that we will otherwise need to make this a per CPU-id check later we might just as well do it now.

Please send a new version of patches 7 + 8 based on top of my review-hans branch.

Regards,

Hans