All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH 2/4] drm/i915: Fix system resume if PCI device remained enabled
Date: Mon, 18 Apr 2016 14:05:53 +0300	[thread overview]
Message-ID: <1460977553.3172.37.camel@intel.com> (raw)
In-Reply-To: <20160418085211.GF10708@nuc-i3427.alporthouse.com>

On ma, 2016-04-18 at 09:52 +0100, Chris Wilson wrote:
> On Mon, Apr 18, 2016 at 11:37:05AM +0300, Imre Deak wrote:
> > I don't know. I guess you mean that enabling the device first seems
> > like the first logical step. To me enabling power is the first
> > logical
> > step and enabling the device itself is the second.
> 
> It is not clear exactly, but what is clear is that
> pci_enable_device()
> sets the power state of this device only after doing so for the
> bridge
> hierachy.

That bridge enabling in pci_enable_deivce() won't make a difference
since the suspend/resume order is already defined so that bridge
devices are suspended last and resumed first. Otoh, the current order
is to call pci_set_power_state() first and then pci_enable_device()
both for our device and all the rest of PCI drivers/devices that I
checked so far. Note that we can't even change this order during the
suspend/resume phase (as opposed to the freeze/thaw phase) since then
it's the PCI core that imposes the order already. So if I would change
this now as you suggest, we would have a different order during the
suspend/resume and the freeze/thaw phases.

> The order in this patch is inconsistent.

I attribute this inconsistency to the sloppiness of the PCI API. I
don't want to change the order in this fix, but I can follow up with a
patch that removes the pci_disable_device()/pci_enable_device() from
our suspend/resume hooks. We can't anyway depend on these doing
anything, since they are dependent on the device enable refcount which
is out of reach of the driver.

I can also add now a code comment about this.

--Imre

  reply	other threads:[~2016-04-18 11:05 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18  7:04 [PATCH 0/4] drm/i915: Fix a few suspend/resume and driver unload bugs Imre Deak
2016-04-18  7:04 ` [PATCH 1/4] drm/i915: Fix error path in i915_drm_resume_early Imre Deak
2016-04-18  8:00   ` Chris Wilson
2016-04-18  8:06     ` Imre Deak
2016-04-18  7:04 ` [PATCH 2/4] drm/i915: Fix system resume if PCI device remained enabled Imre Deak
2016-04-18  8:06   ` [Intel-gfx] " Chris Wilson
2016-04-18  8:06     ` Chris Wilson
2016-04-18  8:16     ` Imre Deak
2016-04-18  8:16       ` [Intel-gfx] " Imre Deak
2016-04-18  8:24       ` Chris Wilson
2016-04-18  8:24         ` Chris Wilson
2016-04-18  8:37         ` Imre Deak
2016-04-18  8:52           ` Chris Wilson
2016-04-18 11:05             ` Imre Deak [this message]
2016-04-18  8:28   ` Ville Syrjälä
2016-04-18  8:28     ` Ville Syrjälä
2016-04-18  8:32     ` Imre Deak
2016-04-18  8:44       ` Ville Syrjälä
2016-04-18  8:44         ` Ville Syrjälä
2016-04-18  8:54         ` Imre Deak
2016-04-18  9:04           ` Ville Syrjälä
2016-04-18  9:04             ` Ville Syrjälä
2016-04-18 11:44   ` [PATCH v2 " Imre Deak
2016-04-18 11:45   ` Imre Deak
2016-04-18 11:45     ` Imre Deak
2016-04-18 14:59     ` Ville Syrjälä
2016-04-18 14:59       ` Ville Syrjälä
2016-04-18  7:04 ` [PATCH 3/4] drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume Imre Deak
2016-04-18 11:05   ` Ville Syrjälä
2016-04-18 11:05     ` Ville Syrjälä
2016-04-18  7:04 ` [PATCH 4/4] drm/i915/gen9: Fix runtime PM refcounting in case DMC firmware isn't loaded Imre Deak
2016-04-18  7:49   ` Chris Wilson
2016-04-18  7:59     ` Imre Deak
2016-04-18 11:48   ` [PATCH v2 " Imre Deak
2016-04-18 12:07     ` Chris Wilson
2016-04-20 13:02     ` Daniel Vetter
2016-04-20 13:13       ` Imre Deak
2016-04-20 13:16         ` Daniel Vetter
2016-04-20 13:35           ` Imre Deak
2016-04-20 14:11             ` Daniel Vetter
2016-04-18  7:24 ` ✓ Fi.CI.BAT: success for drm/i915: Fix a few suspend/resume and driver unload bugs Patchwork
2016-04-18 13:57 ` ✗ Fi.CI.BAT: failure for drm/i915: Fix a few suspend/resume and driver unload bugs (rev3) Patchwork
2016-04-18 15:45   ` Imre Deak
2016-04-19  9:42     ` Imre Deak

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=1460977553.3172.37.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@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.