From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Mika Westerberg <mika.westerberg@intel.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Karol Herbst <kherbst@redhat.com>,
Bjorn Helgaas <helgaas@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Lyude Paul <lyude@redhat.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Linux PCI <linux-pci@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
nouveau <nouveau@lists.freedesktop.org>,
Dave Airlie <airlied@gmail.com>,
Mario Limonciello <Mario.Limonciello@dell.com>
Subject: Re: [PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
Date: Wed, 20 Nov 2019 12:48:35 +0100 [thread overview]
Message-ID: <CAJZ5v0in4VSULsfLshHxhNLf+NZxVQM0xx=hzdNa2X3FW=V7DA@mail.gmail.com> (raw)
In-Reply-To: <20191120112212.GA11621@lahna.fi.intel.com>
On Wed, Nov 20, 2019 at 12:22 PM Mika Westerberg
<mika.westerberg@intel.com> wrote:
>
> On Wed, Nov 20, 2019 at 11:52:22AM +0100, Rafael J. Wysocki wrote:
> > On Wed, Nov 20, 2019 at 11:18 AM Mika Westerberg
> > <mika.westerberg@intel.com> wrote:
> > >
> > > Hi Karol,
> > >
> > > On Tue, Nov 19, 2019 at 11:26:45PM +0100, Karol Herbst wrote:
> > > > On Tue, Nov 19, 2019 at 10:50 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > > >
> > > > > [+cc Dave]
> > > > >
> > > > > On Thu, Oct 17, 2019 at 02:19:01PM +0200, Karol Herbst wrote:
> > > > > > Fixes state transitions of Nvidia Pascal GPUs from D3cold into higher device
> > > > > > states.
> > > > > >
> > > > > > v2: convert to pci_dev quirk
> > > > > > put a proper technical explanation of the issue as a in-code comment
> > > > > > v3: disable it only for certain combinations of intel and nvidia hardware
> > > > > > v4: simplify quirk by setting flag on the GPU itself
> > > > >
> > > > > I have zero confidence that we understand the real problem, but we do
> > > > > need to do something with this. I'll merge it for v5.5 if we get the
> > > > > minor procedural stuff below straightened out.
> > > > >
> > > >
> > > > Thanks, and I agree with your statement, but at this point I think
> > > > only Intel can help out digging deeper as I see no way to debug this
> > > > further.
> > >
> > > I don't have anything against this patch, as long as the quirk stays
> > > limited to the particular root port leading to the NVIDIA GPU. The
> > > reason why I think it should to be limited is that I'm pretty certain
> > > the problem is not in the root port itself. I have here a KBL based
> > > Thinkpad X1 Carbon 6th gen that can put the TBT controller into D3cold
> > > (it is connected to PCH root port) and it wakes up there just fine, so
> > > don't want to break that.
> > >
> > > Now, PCIe devices cannot go into D3cold all by themselves. They always
> > > need help from the platform side which is ACPI in this case. This is
> > > done by having the device to have _PR3 method that returns one or more
> > > power resources that the OS is supposed to turn off when the device is
> > > put into D3cold. All of that is implemented as form of ACPI methods that
> > > pretty much do the hardware specific things that are outside of PCIe
> > > spec to get the device into D3cold. At high level the _OFF() method
> > > causes the root port to broadcast PME_Turn_Off message that results the
> > > link to enter L2/3 ready, it then asserts PERST, configures WAKE (both
> > > can be GPIOs) and finally removes power (if the link goes into L3,
> > > otherwise it goes into L2).
> > >
> > > I think this is where the problem actually lies - the ASL methods that
> > > are used to put the device into D3cold and back. We know that in Windows
> > > this all works fine so unless Windows quirks the root port the same way
> > > there is another reason behind this.
> > >
> > > In case of Dell XPS 9560 (IIRC that's the machine you have) the
> > > corresponding power resource is called \_SB.PCI0.PEG0.PG00 and its
> > > _ON/_OFF methods end up calling PGON()/PGOF() accordingly. The methods
> > > itself do lots of things and it is hard to follow the dissassembled
> > > ASL which does not have any comments but there are couple of things that
> > > stand out where we may go into a different path. One of them is this in
> > > the PGOF() method:
> > >
> > > If (((OSYS <= 0x07D9) || ((OSYS == 0x07DF) && (_REV == 0x05))))
> > >
> > > The ((OSYS == 0x07DF) && (_REV == 0x05)) checks specifically for Linux
> > > (see [1] and 18d78b64fddc ("ACPI / init: Make it possible to override
> > > _REV")) so it might be that Dell people tested this at some point in
> > > Linux as well. Added Mario in case he has any ideas.
> > >
> > > Previously I suggested you to try the ACPI method tracing to see what
> > > happens inside PGOF(). Did you have time to try it? It may provide more
> > > information about that is happening inside those methods and hopefully
> > > point us to the root cause.
> > >
> > > Also if you haven't tried already passing acpi_rev_override in the
> > > command line makes the _REV to return 5 so it should go into the "Linux"
> > > path in PGOF().
> >
> > Oh, so does it look like we are trying to work around AML that tried
> > to work around some problematic behavior in Linux at one point?
>
> Yes, it looks like so if I read the ASL right.
OK, so that would call for a DMI-based quirk as the real cause for the
issue seems to be the AML in question, which means a firmware problem.
next prev parent reply other threads:[~2019-11-20 11:48 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 12:19 [PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges Karol Herbst
2019-11-14 19:17 ` Karol Herbst
2019-11-19 20:06 ` Dave Airlie
2019-11-19 21:49 ` Bjorn Helgaas
2019-11-19 22:26 ` Karol Herbst
2019-11-19 22:57 ` Bjorn Helgaas
2019-11-20 10:18 ` Mika Westerberg
2019-11-20 10:52 ` Rafael J. Wysocki
2019-11-20 11:22 ` Mika Westerberg
2019-11-20 11:48 ` Rafael J. Wysocki [this message]
2019-11-20 11:51 ` Karol Herbst
2019-11-20 12:06 ` Rafael J. Wysocki
2019-11-20 12:09 ` Karol Herbst
2019-11-20 12:14 ` Rafael J. Wysocki
2019-11-20 12:19 ` Karol Herbst
2019-11-20 12:11 ` Rafael J. Wysocki
2019-11-20 11:51 ` Mika Westerberg
2019-11-20 11:54 ` Karol Herbst
2019-11-20 11:58 ` Karol Herbst
2019-11-20 12:09 ` Mika Westerberg
2019-11-20 12:11 ` Karol Herbst
2019-11-20 15:15 ` Mika Westerberg
2019-11-20 15:37 ` Karol Herbst
2019-11-20 15:53 ` Mika Westerberg
2019-11-20 16:23 ` Mika Westerberg
2019-11-20 21:36 ` Karol Herbst
2019-11-21 10:14 ` Mika Westerberg
2019-11-21 11:03 ` Rafael J. Wysocki
2019-11-21 11:08 ` Rafael J. Wysocki
2019-11-21 11:15 ` Rafael J. Wysocki
2019-11-21 11:17 ` Mika Westerberg
2019-11-21 11:31 ` Rafael J. Wysocki
2019-11-20 21:37 ` Rafael J. Wysocki
2019-11-20 21:40 ` Karol Herbst
2019-11-20 22:29 ` Rafael J. Wysocki
2019-11-21 11:28 ` Mika Westerberg
2019-11-21 11:34 ` Rafael J. Wysocki
2019-11-21 11:46 ` Mika Westerberg
2019-11-21 12:52 ` Mika Westerberg
2019-11-21 12:56 ` Karol Herbst
2019-11-21 15:43 ` Rafael J. Wysocki
2019-11-21 19:49 ` Mika Westerberg
2019-11-21 22:39 ` Rafael J. Wysocki
2019-11-21 22:50 ` Karol Herbst
2019-11-22 0:13 ` Karol Herbst
2019-11-22 9:07 ` Rafael J. Wysocki
2019-11-22 11:30 ` Karol Herbst
2019-11-22 10:36 ` Mika Westerberg
2019-11-22 11:30 ` Rafael J. Wysocki
2019-11-22 11:34 ` Karol Herbst
2019-11-22 11:54 ` Rafael J. Wysocki
2019-11-22 11:52 ` Mika Westerberg
2019-11-22 12:15 ` Rafael J. Wysocki
2019-11-21 12:52 ` Karol Herbst
2019-11-21 15:47 ` Rafael J. Wysocki
2019-11-21 16:06 ` Karol Herbst
2019-11-21 16:39 ` Rafael J. Wysocki
2019-11-26 23:10 ` Lyude Paul
2019-11-27 11:48 ` Mika Westerberg
2019-11-27 11:51 ` Karol Herbst
2019-11-27 19:51 ` Lyude Paul
2019-12-09 11:17 ` Karol Herbst
2019-12-09 11:38 ` Rafael J. Wysocki
2019-12-09 12:24 ` Karol Herbst
2019-12-10 19:58 ` Dave Airlie
2019-12-10 20:49 ` Karol Herbst
2020-01-13 15:31 ` Karol Herbst
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='CAJZ5v0in4VSULsfLshHxhNLf+NZxVQM0xx=hzdNa2X3FW=V7DA@mail.gmail.com' \
--to=rafael@kernel.org \
--cc=Mario.Limonciello@dell.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=helgaas@kernel.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=mika.westerberg@intel.com \
--cc=nouveau@lists.freedesktop.org \
--cc=rjw@rjwysocki.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).