All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@intel.com>
To: Karol Herbst <kherbst@redhat.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	LKML <linux-kernel@vger.kernel.org>,
	Lyude Paul <lyude@redhat.com>,
	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>,
	Linux ACPI Mailing List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
Date: Tue, 22 Oct 2019 15:44:53 +0300	[thread overview]
Message-ID: <20191022124453.GK2819@lahna.fi.intel.com> (raw)
In-Reply-To: <CACO55ts7hivYgN7=3bcAjWx2h8FfbR5UiKiOOExYY9m-TGRNfw@mail.gmail.com>

On Tue, Oct 22, 2019 at 11:16:14AM +0200, Karol Herbst wrote:
> I think there is something I totally forgot about:
> 
> When there was never a driver bound to the GPU, and if runtime power
> management gets enabled on that device, runtime suspend/resume works
> as expected (I am not 100% sure on if that always works, but I will
> recheck that).

AFAIK, if there is no driver bound to the PCI device it is left to D0
regardless of the runtime PM state which could explain why it works in
that case (it is never put into D3hot).

I looked at the acpidump you sent and there is one thing that may
explain the differences between Windows and Linux. Not sure if you were
aware of this already, though. The power resource PGOF() method has
this:

   If (((OSYS <= 0x07D9) || ((OSYS == 0x07DF) && (_REV == 0x05)))) {
      ...
   }  

If I read it right, the later condition tries to detect Linux which
fails nowadays but if you have acpi_rev_override in the command line (or
the machine is listed in acpi_rev_dmi_table) this check passes and does
some magic which is not clear to me. There is similar in PGON() side
which is used to turn the device back on.

You can check what actually happens when _ON()/_OFF() is called by
passing something like below to the kernel command line:

  acpi.trace_debug_layer=0x80 acpi.trace_debug_level=0x10 acpi.trace_method_name=\_SB.PCI0.PEG0.PG00._ON acpi.trace_state=method

(See also Documentation/firmware-guide/acpi/method-tracing.rst).

Trace goes to system dmesg.

  reply	other threads:[~2019-10-22 12:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 14:44 [PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges Karol Herbst
2019-10-16 14:44 ` Karol Herbst
2019-10-16 19:14 ` Bjorn Helgaas
2019-10-16 19:18   ` Karol Herbst
2019-10-16 21:37     ` Bjorn Helgaas
2019-10-16 21:37       ` Bjorn Helgaas
2019-10-16 21:48       ` Karol Herbst
2019-10-16 21:48         ` Karol Herbst
2019-10-16 22:03         ` Bjorn Helgaas
2019-10-16 22:03           ` Bjorn Helgaas
2019-10-21 13:33         ` Mika Westerberg
2019-10-21 13:54           ` Karol Herbst
2019-10-21 14:08             ` Mika Westerberg
2019-10-21 14:49               ` Karol Herbst
2019-10-21 15:46                 ` Mika Westerberg
2019-10-21 15:46                   ` Mika Westerberg
2019-10-21 16:40                   ` Karol Herbst
2019-10-22  9:16                     ` Karol Herbst
2019-10-22 12:44                       ` Mika Westerberg [this message]
2019-10-22 12:51                         ` Karol Herbst
2019-10-23  9:00                           ` Mika Westerberg
2019-10-23  9:00                             ` Mika Westerberg
2019-10-21 11:40 ` Mika Westerberg
2019-10-21 12:00   ` Karol Herbst
2019-10-21 12:00     ` Karol Herbst
2019-10-21 12:06     ` Mika Westerberg
2019-10-21 12:06       ` Mika Westerberg
2019-10-21 13:02       ` Karol Herbst
2019-10-21 13:02         ` Karol Herbst
2019-10-21 13:21         ` Mika Westerberg

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=20191022124453.GK2819@lahna.fi.intel.com \
    --to=mika.westerberg@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=helgaas@kernel.org \
    --cc=kherbst@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lyude@redhat.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 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.