All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Peter Wu <peter@lekensteyn.nl>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-pm@vger.kernel.org, linux-pci@vger.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	dri-devel@lists.freedesktop.org,
	Bjorn Helgaas <helgaas@kernel.org>,
	nouveau@lists.freedesktop.org, Dave Airlie <airlied@redhat.com>
Subject: Re: [Nouveau] [PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
Date: Wed, 1 Jun 2016 19:40:43 +0200	[thread overview]
Message-ID: <20160601174043.GA15433@wunner.de> (raw)
In-Reply-To: <20160601165151.GA1947@al>

On Wed, Jun 01, 2016 at 06:51:51PM +0200, Peter Wu wrote:
> On Tue, May 31, 2016 at 02:20:26PM +0200, Lukas Wunner wrote:
> > On Mon, May 30, 2016 at 06:13:51PM +0200, Peter Wu wrote:
> > > Do you have any suggestions for the case where the pcieport driver
> > > refuses to put the bridge in D3 (because the BIOS is too old)? In that
> > > case the nouveau driver needs to fallback to the DSM method (but not
> > > when runtime PM is deliberately disabled by writing control=on).
> > 
> > The BIOS cut-off date is meant to avoid issues when suspending ports
> > on older chipsets. However if the port is used for an Optimus GPU
> > and we can clearly identify that, and there's a _PR3 method provided,
> > it's probably safe to say that the port is *intended* to be suspended.
> > 
> > So you may want to consider amending pci_bridge_d3_possible() to
> > allow D3 for such ports regardless of the BIOS date, as I've done
> > for Thunderbolt in this commit:
> > https://github.com/l1k/linux/commit/3cb8549cd4e5
> 
> Then we have heuristics based on BIOS year, on whether it is TB or not,
> and next to it whether it is an Optimus laptop? Maybe the PCI core needs
> to export a function that allows drivers to override the detection if
> this becomes more common.

Well I consider the TB and Optimus whitelisting as a stop-gap until
the BIOS date is lowered. Rafael wrote:

    Some time around when machines with Windows 10 started to ship should be
    relatively safe.
    I guess we can just pick a reasonable date in the initial patch and then
    try to move it back to the past subsequently and see if that breaks things
    for anyone.

Source: http://permalink.gmane.org/gmane.linux.power-management.general/75133

> 
> > Not sure how to uniquely identify such ports though. Perhaps check
> > if there's a device in slot 0 below the port which has
> > 	(pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY &&
> > 	(pdev->vendor == PCI_VENDOR_ID_NVIDIA ||
> > 	 pdev->vendor == PCI_VENDOR_ID_ATI)
> 
> Seems fragile, there are desktop setups satisfying this match.

Of course, I didn't mean this to be used as is, you'd have to augment
this with checks e.g. for presence of _PR3 and (if possible) Optimus,
but I'm not familiar enough with Optimus to write down working code
for it, I'm only familiar with apple-gmux switching.

Best regards,

Lukas

  reply	other threads:[~2016-06-01 17:40 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 22:52 [PATCH 0/4] nouveau fixes for RPM/Optimus-related hangs Peter Wu
     [not found] ` <1464130381-4797-1-git-send-email-peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org>
2016-05-24 22:52   ` [PATCH 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions Peter Wu
2016-05-24 22:52   ` [PATCH 2/4] drm/nouveau/acpi: return supported DSM functions Peter Wu
2016-05-24 22:53   ` [PATCH 3/4] drm/nouveau/acpi: check for function 0x1B before using it Peter Wu
2016-05-24 22:53 ` [PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM Peter Wu
2016-05-24 22:53   ` Peter Wu
2016-05-25 13:55   ` Mika Westerberg
2016-05-27 11:10     ` Peter Wu
2016-05-27 11:10       ` Peter Wu
2016-05-27 11:55       ` [Nouveau] " Hans de Goede
2016-05-30  9:57       ` Mika Westerberg
2016-05-30  9:57         ` Mika Westerberg
2016-05-30 12:20         ` Peter Wu
2016-05-30 12:20           ` Peter Wu
2016-05-30 13:09           ` Mika Westerberg
2016-05-30 13:09             ` Mika Westerberg
2016-05-30 16:13             ` Peter Wu
2016-05-30 16:13               ` Peter Wu
2016-05-31  8:43               ` Mika Westerberg
2016-05-31 11:02                 ` Peter Wu
2016-05-31 11:02                   ` Peter Wu
2016-06-01  9:28                   ` Mika Westerberg
2016-06-01 17:21                     ` Peter Wu
2016-06-01 17:21                       ` Peter Wu
2016-05-31 12:20               ` [Nouveau] " Lukas Wunner
2016-05-31 12:20                 ` Lukas Wunner
2016-06-01 16:51                 ` [Nouveau] " Peter Wu
2016-06-01 16:51                   ` Peter Wu
2016-06-01 17:40                   ` Lukas Wunner [this message]
2016-05-27 13:01   ` [Nouveau] " Emil Velikov
2016-05-27 21:31     ` Peter Wu
2016-05-27 21:31       ` Peter Wu
2016-05-28 12:27       ` [Nouveau] " Lukas Wunner
2016-05-28 12:27         ` Lukas Wunner
2016-05-30 10:48       ` [Nouveau] " Emil Velikov
2016-05-30 11:23         ` Peter Wu
2016-05-30 11:23           ` Peter Wu
2016-05-30 12:41           ` [Nouveau] " Emil Velikov
2016-05-30 12:41             ` Emil Velikov
2016-05-25  9:08 ` [Nouveau] [PATCH 0/4] nouveau fixes for RPM/Optimus-related hangs 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=20160601174043.GA15433@wunner.de \
    --to=lukas@wunner.de \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=peter@lekensteyn.nl \
    --cc=rafael.j.wysocki@intel.com \
    /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.