All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Pearson <markpearson@lenovo.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
	Hans de Goede <hdegoede@redhat.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	Mark Gross <mgross@linux.intel.com>,
	"open list:THINKPAD ACPI EXTRAS DRIVER" 
	<ibm-acpi-devel@lists.sourceforge.net>,
	"open list:THINKPAD ACPI EXTRAS DRIVER" 
	<platform-driver-x86@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [External] [PATCH 2/2] platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops
Date: Fri, 29 Apr 2022 08:21:43 -0400	[thread overview]
Message-ID: <a5faa9e6-feba-6a76-de53-1c9d2c572da4@lenovo.com> (raw)
In-Reply-To: <20220429030501.1909-3-mario.limonciello@amd.com>


On 4/28/22 23:05, Mario Limonciello wrote:
> Lenovo laptops that contain NVME SSDs across a variety of generations have
> trouble resuming from suspend to idle when the IOMMU translation layer is
> active for the NVME storage device.
> 
> This generally manifests as a large resume delay or page faults. These
> delays and page faults occur as a result of a Lenovo BIOS specific SMI
> that runs during the D3->D0 transition on NVME devices.
> 
> This SMI occurs because of a flag that is set during resume by Lenovo
> firmware:
> 
> ```
> OperationRegion (PM80, SystemMemory, 0xFED80380, 0x10)
> Field (PM80, AnyAcc, NoLock, Preserve)
> {
> 	SI3R,   1
> }
> 
> Method (_ON, 0, NotSerialized)  // _ON_: Power On
> {
> 	TPST (0x60D0)
> 	If ((DAS3 == 0x00))
> 	{
> 		If (SI3R)
> 		{
> 			TPST (0x60E0)
> 			M020 (NBRI, 0x00, 0x00, 0x04, (NCMD | 0x06))
> 			M020 (NBRI, 0x00, 0x00, 0x10, NBAR)
> 			APMC = HDSI /* \HDSI */
> 			SLPS = 0x01
> 			SI3R = 0x00
> 			TPST (0x60E1)
> 		}
> 		D0NV = 0x01
> 	}
> }
> ```
> 
> Create a quirk that will run early in the resume process to prevent this
> SMI from running. As any of these machines are fixed, they can be peeled
> back from this quirk or narrowed down to individual firmware versions.
> 
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1910>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1689>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Thanks Mario,

Tested the series on the T14 G1 AMD and it fixes the long delay when
resuming from S0ix suspend nicely.

Patches look good to me. I am working with the Lenovo FW teams for the
various platforms, but as S0ix support wasn't in the original scope I
don't know yet when (or if in some cases) they'll get FW fixes released.
I believe these changes are benign even once the FW is fixed so think
this is a great idea.

I'll push updates removing platform quirks once FW is released though.

Tested-by: Mark Pearson <markpearson@lenvo.com>


  reply	other threads:[~2022-04-29 12:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  3:04 [PATCH 0/2] Add a workaround for s2idle resume on Lenovo laptops Mario Limonciello
2022-04-29  3:05 ` [PATCH 1/2] platform/x86: thinkpad_acpi: Convert btusb DMI list to quirks Mario Limonciello
2022-04-29  3:05 ` [PATCH 2/2] platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops Mario Limonciello
2022-04-29 12:21   ` Mark Pearson [this message]
2022-05-02 15:31 ` [PATCH 0/2] Add a workaround for s2idle resume on Lenovo laptops Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5faa9e6-feba-6a76-de53-1c9d2c572da4@lenovo.com \
    --to=markpearson@lenovo.com \
    --cc=hdegoede@redhat.com \
    --cc=hmh@hmh.eng.br \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.