From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>,
"Rafael J. Wysocki" <rjw@sisk.pl>, Greg KH <greg@kroah.com>,
Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: Suspend problems in 2.6.31-rc6
Date: Fri, 21 Aug 2009 11:13:20 +0800 [thread overview]
Message-ID: <20090821031320.GA21420@zhen-devel.sh.intel.com> (raw)
In-Reply-To: <20090821012132.GB14002@zhen-devel.sh.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2673 bytes --]
On 2009.08.21 09:21:32 +0800, Zhenyu Wang wrote:
> On 2009.08.20 11:17:45 -0400, Alan Stern wrote:
> > On Wed, 19 Aug 2009, Rafael J. Wysocki wrote:
> >
> > > Usually, however, restoring the PCI config space twice doesn't hurt, although
> > > it evidently does hurt on your system.
> > >
> > > Hm, there's a patch that should help here I think. Can you please test
> > > this one: http://patchwork.kernel.org/patch/40062/ ?
> >
> > Testing confirms that Alex's patch (pci: check saved state before
> > restore) fixes the resume problem. IMO it should be merged before
> > 2.6.31 is released.
> >
>
> I can't understand why Alex's patch could fix for you, or because you've
> seen 'state_saved' is false in your testing, and Alex's patch just workaround
> state restore for you? I don't understand why 'state_saved' is false in your
> case, as pci layer should do save state for us by default, no?
>
> Could you try with this one? And what's your gfx chip? I've tested rc6 on my
> 965GM yesterday, S3/S4 both seem fine...
>
oops, here's right one for testing...
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 8c9d50d..5ed62c1 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -2303,6 +2303,13 @@ static void __devexit agp_intel_remove(struct pci_dev *pdev)
}
#ifdef CONFIG_PM
+static int agp_intel_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+ pci_save_state(pdev);
+ pci_set_power_state(pdev, 3);
+ return 0;
+}
+
static int agp_intel_resume(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
@@ -2410,6 +2417,7 @@ static struct pci_driver agp_intel_pci_driver = {
.remove = __devexit_p(agp_intel_remove),
#ifdef CONFIG_PM
.resume = agp_intel_resume,
+ .suspend = agp_intel_suspend,
#endif
};
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index fc4b68a..f54880f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -95,7 +95,11 @@ static int i915_resume(struct drm_device *dev)
int ret = 0;
pci_set_power_state(dev->pdev, PCI_D0);
- pci_restore_state(dev->pdev);
+ /* XXX as pci layer should have already early restore state
+ for us, or intel_agp driver has taken care of reconfigure,
+ we don't need to restore again here, which might corrupt
+ reconfigured state...*/
+ /* pci_restore_state(dev->pdev); */
if (pci_enable_device(dev->pdev))
return -1;
pci_set_master(dev->pdev);
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2009-08-21 3:13 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 15:11 Suspend problems in 2.6.31-rc6 Alan Stern
2009-08-17 18:28 ` Rafael J. Wysocki
2009-08-17 20:53 ` Alan Stern
2009-08-17 21:14 ` Greg KH
2009-08-17 21:15 ` Greg KH
2009-08-17 21:31 ` Jiri Slaby
2009-08-17 21:33 ` Jiri Slaby
2009-08-17 21:21 ` Rafael J. Wysocki
2009-08-17 21:50 ` Alan Stern
2009-08-18 16:07 ` Alan Stern
2009-08-18 23:22 ` Rafael J. Wysocki
2009-08-19 2:01 ` Zhenyu Wang
2009-08-19 14:42 ` Alan Stern
2009-08-20 1:05 ` Zhenyu Wang
2009-08-20 14:03 ` Alan Stern
2009-08-21 1:17 ` Zhenyu Wang
2009-08-20 15:34 ` Rafael J. Wysocki
2009-08-19 14:26 ` Alan Stern
2009-08-19 21:22 ` Rafael J. Wysocki
2009-08-20 15:17 ` Alan Stern
2009-08-20 16:17 ` Rafael J. Wysocki
2009-08-21 1:21 ` Zhenyu Wang
2009-08-21 3:13 ` Zhenyu Wang [this message]
2009-08-21 14:32 ` Alan Stern
2009-08-21 17:01 ` Rafael J. Wysocki
2009-08-24 2:34 ` Zhenyu Wang
2009-08-24 18:55 ` Rafael J. Wysocki
2009-08-25 0:59 ` Alan Stern
2009-08-27 14:51 ` Alan Stern
2009-08-27 16:18 ` Jesse Barnes
2009-08-24 1:30 ` Zhenyu Wang
2009-08-20 15:41 ` Rafael J. Wysocki
2009-08-20 16:05 ` Jesse Barnes
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=20090821031320.GA21420@zhen-devel.sh.intel.com \
--to=zhenyuw@linux.intel.com \
--cc=greg@kroah.com \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
--cc=stern@rowland.harvard.edu \
/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