Message ID | 20240821150446.392726-1-Shyam-sundar.S-k@amd.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | platform/x86/amd/pmc: Extend support for PMC features on new AMD platform | expand |
On 8/21/2024 10:04, Shyam Sundar S K wrote: > PMC driver has capability to get the IP information, idle mask values and > STB data from the PMFW. Extend this support to the platforms that belong > to family 1Ah model 60h series. > > Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> > Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> > Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> This is actually a fix for another commit in 6.11. Hans, Ilpo, can you please take it in fixes? Fixes: 426463d94d45d ("platform/x86/amd/pmc: Send OS_HINT command for new AMD platform") > --- > drivers/platform/x86/amd/pmc/pmc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c > index c3e51f0a5c33..bbb8edb62e00 100644 > --- a/drivers/platform/x86/amd/pmc/pmc.c > +++ b/drivers/platform/x86/amd/pmc/pmc.c > @@ -359,6 +359,7 @@ static void amd_pmc_get_ip_info(struct amd_pmc_dev *dev) > dev->smu_msg = 0x538; > break; > case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: > + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: > dev->num_ips = 22; > dev->s2d_msg_id = 0xDE; > dev->smu_msg = 0x938; > @@ -597,6 +598,7 @@ static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev, > val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC); > break; > case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: > + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: > val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_1AH); > break; > default: > @@ -630,6 +632,7 @@ static bool amd_pmc_is_stb_supported(struct amd_pmc_dev *dev) > case AMD_CPU_ID_CB: > case AMD_CPU_ID_PS: > case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: > + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: > return true; > default: > return false;
On 8/21/2024 22:18, Mario Limonciello wrote: > On 8/21/2024 10:04, Shyam Sundar S K wrote: >> PMC driver has capability to get the IP information, idle mask >> values and >> STB data from the PMFW. Extend this support to the platforms that >> belong >> to family 1Ah model 60h series. >> >> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> >> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> >> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> > > Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> > > This is actually a fix for another commit in 6.11. Hans, Ilpo, can > you please take it in fixes? > > Fixes: 426463d94d45d ("platform/x86/amd/pmc: Send OS_HINT command for > new AMD platform") > I'm not certain how this commit addresses the existing issue. Last week, when I sent out commit 426463d94d45d, I tested the changes on my test bed, and everything seemed to work fine. If this new commit is indeed resolving an existing problem, I shall amend the commit message to make it more meaningful. Thanks, Shyam >> --- >> drivers/platform/x86/amd/pmc/pmc.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/platform/x86/amd/pmc/pmc.c >> b/drivers/platform/x86/amd/pmc/pmc.c >> index c3e51f0a5c33..bbb8edb62e00 100644 >> --- a/drivers/platform/x86/amd/pmc/pmc.c >> +++ b/drivers/platform/x86/amd/pmc/pmc.c >> @@ -359,6 +359,7 @@ static void amd_pmc_get_ip_info(struct >> amd_pmc_dev *dev) >> dev->smu_msg = 0x538; >> break; >> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >> dev->num_ips = 22; >> dev->s2d_msg_id = 0xDE; >> dev->smu_msg = 0x938; >> @@ -597,6 +598,7 @@ static int amd_pmc_idlemask_read(struct >> amd_pmc_dev *pdev, struct device *dev, >> val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC); >> break; >> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >> val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_1AH); >> break; >> default: >> @@ -630,6 +632,7 @@ static bool amd_pmc_is_stb_supported(struct >> amd_pmc_dev *dev) >> case AMD_CPU_ID_CB: >> case AMD_CPU_ID_PS: >> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >> return true; >> default: >> return false; >
On 8/21/2024 12:40, Shyam Sundar S K wrote: > > > On 8/21/2024 22:18, Mario Limonciello wrote: >> On 8/21/2024 10:04, Shyam Sundar S K wrote: >>> PMC driver has capability to get the IP information, idle mask >>> values and >>> STB data from the PMFW. Extend this support to the platforms that >>> belong >>> to family 1Ah model 60h series. >>> >>> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> >>> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> >>> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> >> >> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> >> >> This is actually a fix for another commit in 6.11. Hans, Ilpo, can >> you please take it in fixes? >> >> Fixes: 426463d94d45d ("platform/x86/amd/pmc: Send OS_HINT command for >> new AMD platform") >> > > I'm not certain how this commit addresses the existing issue. Last > week, when I sent out commit 426463d94d45d, I tested the changes on my > test bed, and everything seemed to work fine. > > If this new commit is indeed resolving an existing problem, I shall > amend the commit message to make it more meaningful. Hmm when I was talking to a colleague about it this morning s0i3 didn't start working on this platform until this change, presumably because the message IDs weren't properly configured without it. > > Thanks, > Shyam > >>> --- >>> drivers/platform/x86/amd/pmc/pmc.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/platform/x86/amd/pmc/pmc.c >>> b/drivers/platform/x86/amd/pmc/pmc.c >>> index c3e51f0a5c33..bbb8edb62e00 100644 >>> --- a/drivers/platform/x86/amd/pmc/pmc.c >>> +++ b/drivers/platform/x86/amd/pmc/pmc.c >>> @@ -359,6 +359,7 @@ static void amd_pmc_get_ip_info(struct >>> amd_pmc_dev *dev) >>> dev->smu_msg = 0x538; >>> break; >>> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >>> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >>> dev->num_ips = 22; >>> dev->s2d_msg_id = 0xDE; >>> dev->smu_msg = 0x938; >>> @@ -597,6 +598,7 @@ static int amd_pmc_idlemask_read(struct >>> amd_pmc_dev *pdev, struct device *dev, >>> val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC); >>> break; >>> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >>> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >>> val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_1AH); >>> break; >>> default: >>> @@ -630,6 +632,7 @@ static bool amd_pmc_is_stb_supported(struct >>> amd_pmc_dev *dev) >>> case AMD_CPU_ID_CB: >>> case AMD_CPU_ID_PS: >>> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >>> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >>> return true; >>> default: >>> return false; >>
On 8/21/2024 23:12, Mario Limonciello wrote: > On 8/21/2024 12:40, Shyam Sundar S K wrote: >> >> >> On 8/21/2024 22:18, Mario Limonciello wrote: >>> On 8/21/2024 10:04, Shyam Sundar S K wrote: >>>> PMC driver has capability to get the IP information, idle mask >>>> values and >>>> STB data from the PMFW. Extend this support to the platforms that >>>> belong >>>> to family 1Ah model 60h series. >>>> >>>> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> >>>> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> >>>> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> >>> >>> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> >>> >>> This is actually a fix for another commit in 6.11. Hans, Ilpo, can >>> you please take it in fixes? >>> >>> Fixes: 426463d94d45d ("platform/x86/amd/pmc: Send OS_HINT command for >>> new AMD platform") >>> >> >> I'm not certain how this commit addresses the existing issue. Last >> week, when I sent out commit 426463d94d45d, I tested the changes on my >> test bed, and everything seemed to work fine. >> >> If this new commit is indeed resolving an existing problem, I shall >> amend the commit message to make it more meaningful. > > Hmm when I was talking to a colleague about it this morning s0i3 > didn't start working on this platform until this change, presumably > because the message IDs weren't properly configured without it. Okay thanks! Let me respin a new version with a updated commit. > >> >> Thanks, >> Shyam >> >>>> --- >>>> drivers/platform/x86/amd/pmc/pmc.c | 3 +++ >>>> 1 file changed, 3 insertions(+) >>>> >>>> diff --git a/drivers/platform/x86/amd/pmc/pmc.c >>>> b/drivers/platform/x86/amd/pmc/pmc.c >>>> index c3e51f0a5c33..bbb8edb62e00 100644 >>>> --- a/drivers/platform/x86/amd/pmc/pmc.c >>>> +++ b/drivers/platform/x86/amd/pmc/pmc.c >>>> @@ -359,6 +359,7 @@ static void amd_pmc_get_ip_info(struct >>>> amd_pmc_dev *dev) >>>> dev->smu_msg = 0x538; >>>> break; >>>> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >>>> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >>>> dev->num_ips = 22; >>>> dev->s2d_msg_id = 0xDE; >>>> dev->smu_msg = 0x938; >>>> @@ -597,6 +598,7 @@ static int amd_pmc_idlemask_read(struct >>>> amd_pmc_dev *pdev, struct device *dev, >>>> val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC); >>>> break; >>>> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >>>> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >>>> val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_1AH); >>>> break; >>>> default: >>>> @@ -630,6 +632,7 @@ static bool amd_pmc_is_stb_supported(struct >>>> amd_pmc_dev *dev) >>>> case AMD_CPU_ID_CB: >>>> case AMD_CPU_ID_PS: >>>> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: >>>> + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: >>>> return true; >>>> default: >>>> return false; >>> >
On Wed, 21 Aug 2024, Mario Limonciello wrote: > On 8/21/2024 10:04, Shyam Sundar S K wrote: > > PMC driver has capability to get the IP information, idle mask values and > > STB data from the PMFW. Extend this support to the platforms that belong > > to family 1Ah model 60h series. > > > > Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> > > Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> > > Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> > > Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> > > This is actually a fix for another commit in 6.11. Hans, Ilpo, can you please > take it in fixes? > > Fixes: 426463d94d45d ("platform/x86/amd/pmc: Send OS_HINT command for new AMD > platform") For that, a proper justification is necessary in the commit message (but I guess Shyam was going to improve that too while respinning given the other replies).
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c index c3e51f0a5c33..bbb8edb62e00 100644 --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -359,6 +359,7 @@ static void amd_pmc_get_ip_info(struct amd_pmc_dev *dev) dev->smu_msg = 0x538; break; case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: dev->num_ips = 22; dev->s2d_msg_id = 0xDE; dev->smu_msg = 0x938; @@ -597,6 +598,7 @@ static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev, val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC); break; case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_1AH); break; default: @@ -630,6 +632,7 @@ static bool amd_pmc_is_stb_supported(struct amd_pmc_dev *dev) case AMD_CPU_ID_CB: case AMD_CPU_ID_PS: case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: return true; default: return false;