All of lore.kernel.org
 help / color / mirror / Atom feed
* amd-pmc s2idle driver issues
@ 2020-12-20 21:12 Alexander Monakov
  2020-12-22 14:16 ` Deucher, Alexander
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Monakov @ 2020-12-20 21:12 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: Shyam Sundar S K, Hans de Goede, Alexander.Deucher, linux-kernel

Hi folks,

I've tried the "platform/x86: amd-pmc: Add AMD platform support for S2Idle"
patch on my Acer Swift SF314-42 laptop (Renoir SoC, Ryzen 4500U CPU) and hit
the following issues:

1. The driver doesn't bind to any device. It has the following binding table:

+static const struct acpi_device_id amd_pmc_acpi_ids[] = {
+	{"AMDI0005", 0},
+	{"AMD0004", 0},
+	{ }
+};

This laptop has "AMD0005" instead. Adding it to the list allows the driver to
successfully probe.

2. The debugfs interface does not seem to be very helpful. It shows

SMU FW Info: ffffffff

It's not very informative. The code seems to be fetching SMU version from mmio,
so I guess the file should be saying "FW version" rather than "FW Info", and
then, I think version number is not supposed to be "-1".


(and I'm afraid I cannot use the driver, as there seems to be an issue with
GPU resume: sometimes the screen is frozen or black after resume, so I need
to reboot the laptop :( )

Alexander

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: amd-pmc s2idle driver issues
  2020-12-20 21:12 amd-pmc s2idle driver issues Alexander Monakov
@ 2020-12-22 14:16 ` Deucher, Alexander
  2020-12-22 14:45   ` Alexander Monakov
  0 siblings, 1 reply; 7+ messages in thread
From: Deucher, Alexander @ 2020-12-22 14:16 UTC (permalink / raw)
  To: Alexander Monakov, platform-driver-x86
  Cc: S-k, Shyam-sundar, Hans de Goede, linux-kernel

[AMD Public Use]

> -----Original Message-----
> From: Alexander Monakov <amonakov@ispras.ru>
> Sent: Sunday, December 20, 2020 4:12 PM
> To: platform-driver-x86@vger.kernel.org
> Cc: S-k, Shyam-sundar <Shyam-sundar.S-k@amd.com>; Hans de Goede
> <hdegoede@redhat.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; linux-kernel@vger.kernel.org
> Subject: amd-pmc s2idle driver issues
> 
> Hi folks,
> 
> I've tried the "platform/x86: amd-pmc: Add AMD platform support for
> S2Idle"
> patch on my Acer Swift SF314-42 laptop (Renoir SoC, Ryzen 4500U CPU) and
> hit the following issues:
> 
> 1. The driver doesn't bind to any device. It has the following binding table:
> 
> +static const struct acpi_device_id amd_pmc_acpi_ids[] = {
> +	{"AMDI0005", 0},
> +	{"AMD0004", 0},
> +	{ }
> +};
> 
> This laptop has "AMD0005" instead. Adding it to the list allows the driver to
> successfully probe.
> 
> 2. The debugfs interface does not seem to be very helpful. It shows
> 
> SMU FW Info: ffffffff
> 
> It's not very informative. The code seems to be fetching SMU version from
> mmio, so I guess the file should be saying "FW version" rather than "FW
> Info", and then, I think version number is not supposed to be "-1".
> 

Does your platform support modern standby?  You may have to select between legacy S3 and modern standby in the sbios.

> 
> (and I'm afraid I cannot use the driver, as there seems to be an issue with
> GPU resume: sometimes the screen is frozen or black after resume, so I
> need to reboot the laptop :( )

We are still working through various platform specific sbios issues on some renoir platforms.  We'll be sending out the appropriate quirks to handle them once we've sorted them all out.

Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: amd-pmc s2idle driver issues
  2020-12-22 14:16 ` Deucher, Alexander
@ 2020-12-22 14:45   ` Alexander Monakov
  2020-12-22 15:20     ` Deucher, Alexander
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Monakov @ 2020-12-22 14:45 UTC (permalink / raw)
  To: Deucher, Alexander
  Cc: platform-driver-x86, S-k, Shyam-sundar, Hans de Goede, linux-kernel

On Tue, 22 Dec 2020, Deucher, Alexander wrote:

> > I've tried the "platform/x86: amd-pmc: Add AMD platform support for
> > S2Idle"
> > patch on my Acer Swift SF314-42 laptop (Renoir SoC, Ryzen 4500U CPU) and
> > hit the following issues:
> > 
> > 1. The driver doesn't bind to any device. It has the following binding table:
> > 
> > +static const struct acpi_device_id amd_pmc_acpi_ids[] = {
> > +	{"AMDI0005", 0},
> > +	{"AMD0004", 0},
> > +	{ }
> > +};
> > 
> > This laptop has "AMD0005" instead. Adding it to the list allows the driver to
> > successfully probe.
> > 
> > 2. The debugfs interface does not seem to be very helpful. It shows
> > 
> > SMU FW Info: ffffffff
> > 
> > It's not very informative. The code seems to be fetching SMU version from
> > mmio, so I guess the file should be saying "FW version" rather than "FW
> > Info", and then, I think version number is not supposed to be "-1".
> > 
> 
> Does your platform support modern standby?  You may have to select between
> legacy S3 and modern standby in the sbios.

Yes. Out-of-the-box it's a "modern standby" laptop. There's a "hidden"
bios menu with extra settings that apparently allows to select legacy S3.
I did not change it, so I'm testing the "modern" mode.

Note that this driver fetches SMU version from MMIO, which looks odd to me:
elsewhere (i.e. in the amdgpu driver) SMU version is retrieved by issuing
the corresponding SMU command, as far as I can tell.

Alexander

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: amd-pmc s2idle driver issues
  2020-12-22 14:45   ` Alexander Monakov
@ 2020-12-22 15:20     ` Deucher, Alexander
  2020-12-22 15:57       ` Alexander Monakov
  0 siblings, 1 reply; 7+ messages in thread
From: Deucher, Alexander @ 2020-12-22 15:20 UTC (permalink / raw)
  To: Alexander Monakov
  Cc: platform-driver-x86, S-k, Shyam-sundar, Hans de Goede, linux-kernel

[AMD Public Use]

> -----Original Message-----
> From: Alexander Monakov <amonakov@ispras.ru>
> Sent: Tuesday, December 22, 2020 9:45 AM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>
> Cc: platform-driver-x86@vger.kernel.org; S-k, Shyam-sundar <Shyam-
> sundar.S-k@amd.com>; Hans de Goede <hdegoede@redhat.com>; linux-
> kernel@vger.kernel.org
> Subject: RE: amd-pmc s2idle driver issues
> 
> On Tue, 22 Dec 2020, Deucher, Alexander wrote:
> 
> > > I've tried the "platform/x86: amd-pmc: Add AMD platform support for
> > > S2Idle"
> > > patch on my Acer Swift SF314-42 laptop (Renoir SoC, Ryzen 4500U CPU)
> > > and hit the following issues:
> > >
> > > 1. The driver doesn't bind to any device. It has the following binding table:
> > >
> > > +static const struct acpi_device_id amd_pmc_acpi_ids[] = {
> > > +	{"AMDI0005", 0},
> > > +	{"AMD0004", 0},
> > > +	{ }
> > > +};
> > >
> > > This laptop has "AMD0005" instead. Adding it to the list allows the
> > > driver to successfully probe.
> > >
> > > 2. The debugfs interface does not seem to be very helpful. It shows
> > >
> > > SMU FW Info: ffffffff
> > >
> > > It's not very informative. The code seems to be fetching SMU version
> > > from mmio, so I guess the file should be saying "FW version" rather
> > > than "FW Info", and then, I think version number is not supposed to be "-
> 1".
> > >
> >
> > Does your platform support modern standby?  You may have to select
> > between legacy S3 and modern standby in the sbios.
> 
> Yes. Out-of-the-box it's a "modern standby" laptop. There's a "hidden"
> bios menu with extra settings that apparently allows to select legacy S3.
> I did not change it, so I'm testing the "modern" mode.
> 
> Note that this driver fetches SMU version from MMIO, which looks odd to
> me:
> elsewhere (i.e. in the amdgpu driver) SMU version is retrieved by issuing the
> corresponding SMU command, as far as I can tell.

There are multiple interfaces to the SMU. It's shared by the entire SoC on APUs.

Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: amd-pmc s2idle driver issues
  2020-12-22 15:20     ` Deucher, Alexander
@ 2020-12-22 15:57       ` Alexander Monakov
  2020-12-22 16:44         ` Deucher, Alexander
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Monakov @ 2020-12-22 15:57 UTC (permalink / raw)
  To: Deucher, Alexander
  Cc: platform-driver-x86, S-k, Shyam-sundar, Hans de Goede, linux-kernel

On Tue, 22 Dec 2020, Deucher, Alexander wrote:

> > Yes. Out-of-the-box it's a "modern standby" laptop. There's a "hidden"
> > bios menu with extra settings that apparently allows to select legacy S3.
> > I did not change it, so I'm testing the "modern" mode.
> > 
> > Note that this driver fetches SMU version from MMIO, which looks odd to
> > me:
> > elsewhere (i.e. in the amdgpu driver) SMU version is retrieved by issuing the
> > corresponding SMU command, as far as I can tell.
> 
> There are multiple interfaces to the SMU. It's shared by the entire SoC on
> APUs.

Just pointing that out because evidently this interface does not work on this
laptop, producing all-ones instead of something resembling a version number.

Which APU generations does this driver support? If it does not support Renoir
(yet?) it should be documented in the Kconfig text. Is Renoir support related
to missing AMD0005 ACPI id binding, and borked version number info?

Alexander

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: amd-pmc s2idle driver issues
  2020-12-22 15:57       ` Alexander Monakov
@ 2020-12-22 16:44         ` Deucher, Alexander
  2020-12-22 17:25           ` Shyam Sundar S K
  0 siblings, 1 reply; 7+ messages in thread
From: Deucher, Alexander @ 2020-12-22 16:44 UTC (permalink / raw)
  To: Alexander Monakov
  Cc: platform-driver-x86, S-k, Shyam-sundar, Hans de Goede, linux-kernel

[AMD Public Use]

> -----Original Message-----
> From: Alexander Monakov <amonakov@ispras.ru>
> Sent: Tuesday, December 22, 2020 10:57 AM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>
> Cc: platform-driver-x86@vger.kernel.org; S-k, Shyam-sundar <Shyam-
> sundar.S-k@amd.com>; Hans de Goede <hdegoede@redhat.com>; linux-
> kernel@vger.kernel.org
> Subject: RE: amd-pmc s2idle driver issues
> 
> On Tue, 22 Dec 2020, Deucher, Alexander wrote:
> 
> > > Yes. Out-of-the-box it's a "modern standby" laptop. There's a "hidden"
> > > bios menu with extra settings that apparently allows to select legacy S3.
> > > I did not change it, so I'm testing the "modern" mode.
> > >
> > > Note that this driver fetches SMU version from MMIO, which looks odd
> > > to
> > > me:
> > > elsewhere (i.e. in the amdgpu driver) SMU version is retrieved by
> > > issuing the corresponding SMU command, as far as I can tell.
> >
> > There are multiple interfaces to the SMU. It's shared by the entire
> > SoC on APUs.
> 
> Just pointing that out because evidently this interface does not work on this
> laptop, producing all-ones instead of something resembling a version
> number.
> 
> Which APU generations does this driver support? If it does not support
> Renoir
> (yet?) it should be documented in the Kconfig text. Is Renoir support related
> to missing AMD0005 ACPI id binding, and borked version number info?

The current code supports both Raven/Picasso and Renoir parts. At least some Renoir parts are supported as that is what we are mainly testing now.  I'm not sure why some boards have AMDI0005 vs AMD0005. We'll have to check with the sbios or windows teams.

Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: amd-pmc s2idle driver issues
  2020-12-22 16:44         ` Deucher, Alexander
@ 2020-12-22 17:25           ` Shyam Sundar S K
  0 siblings, 0 replies; 7+ messages in thread
From: Shyam Sundar S K @ 2020-12-22 17:25 UTC (permalink / raw)
  To: Deucher, Alexander, Alexander Monakov
  Cc: platform-driver-x86, Hans de Goede, linux-kernel



On 12/22/2020 10:14 PM, Deucher, Alexander wrote:
> [AMD Public Use]
> 
>> -----Original Message-----
>> From: Alexander Monakov <amonakov@ispras.ru>
>> Sent: Tuesday, December 22, 2020 10:57 AM
>> To: Deucher, Alexander <Alexander.Deucher@amd.com>
>> Cc: platform-driver-x86@vger.kernel.org; S-k, Shyam-sundar <Shyam-
>> sundar.S-k@amd.com>; Hans de Goede <hdegoede@redhat.com>; linux-
>> kernel@vger.kernel.org
>> Subject: RE: amd-pmc s2idle driver issues
>>
>> On Tue, 22 Dec 2020, Deucher, Alexander wrote:
>>
>>>> Yes. Out-of-the-box it's a "modern standby" laptop. There's a "hidden"
>>>> bios menu with extra settings that apparently allows to select legacy S3.
>>>> I did not change it, so I'm testing the "modern" mode.
>>>>
>>>> Note that this driver fetches SMU version from MMIO, which looks odd
>>>> to
>>>> me:
>>>> elsewhere (i.e. in the amdgpu driver) SMU version is retrieved by
>>>> issuing the corresponding SMU command, as far as I can tell.
>>>
>>> There are multiple interfaces to the SMU. It's shared by the entire
>>> SoC on APUs.
>>
>> Just pointing that out because evidently this interface does not work on this
>> laptop, producing all-ones instead of something resembling a version
>> number.
>>
>> Which APU generations does this driver support? If it does not support
>> Renoir
>> (yet?) it should be documented in the Kconfig text. Is Renoir support related
>> to missing AMD0005 ACPI id binding, and borked version number info?
> 
> The current code supports both Raven/Picasso and Renoir parts. At least some Renoir parts are supported as that is what we are mainly testing now.  I'm not sure why some boards have AMDI0005 vs AMD0005. We'll have to check with the sbios or windows teams.
> 

I think newer sbios'es have the AMDI0005 for Renior also. So, I am guessing you might be running an older BIOS. This driver is supposed to work for all generations of RYZEN starting from Picasso (provided you the right bios which supports modern standby).

You can keep an eye if some of the devices are not entering the lowest device state if your kernel is built with this patch: 
https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=146f1ed852a87b802ed6e71c31e189c64871383c

Also, on my reference platform I see the debugfs giving some valid information. Since you have a sbios with AMD0005, I cannot comment much on it.

Thanks,
Shyam

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-22 17:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-20 21:12 amd-pmc s2idle driver issues Alexander Monakov
2020-12-22 14:16 ` Deucher, Alexander
2020-12-22 14:45   ` Alexander Monakov
2020-12-22 15:20     ` Deucher, Alexander
2020-12-22 15:57       ` Alexander Monakov
2020-12-22 16:44         ` Deucher, Alexander
2020-12-22 17:25           ` Shyam Sundar S K

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.