LKML Archive on
help / color / mirror / Atom feed
From: Andreas Mohr <>
To: Andreas Mohr <>,
	Pavel Machek <>,,,
	kernel list <>
Subject: Re: intel-agp PM experiences (was: 2.6.20-rc5: usb mouse breaks suspend to ram)
Date: Wed, 31 Jan 2007 00:39:35 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>


On Tue, Jan 30, 2007 at 08:36:32PM +0800, Wang Zhenyu wrote:
> ok, just see the AGP tables bits definition for intel_i815_driver,
> /* Intel registers */
> #define INTEL_APSIZE    0xb4
> #define INTEL_ATTBASE   0xb8
> #define INTEL_AGPCTRL   0xb0
> ...
> And this could explain why your patch can make X come back to live on
> i815, as default suspend saves 64bytes. We need suspend func to handle
> this, but for now mainline intel integrated gfx, this's not needed. 
> Would you send out a cleanup patch later?

OK, I just spent an entire evening on this tiresome procedure
of trying, not quite successful, machine killed, rebooting, adapting,
trying, hang, ...

My conclusions:
- never forget about stup@#$@#$% PCI posting! (hours wasted
  due to register values NOT restored after resume...)
- those 3 registers above are not sufficient, since AGP status is
  completely broken, not even such basic things as 4x mode or sideband
  addressing bits get restored, so these need proper care as well.
- backing up about 10 registers properly (all those that have
  different state after resume) makes it work fine without going
  over the whole extended PCI register range needlessly

I'm going to spend more time on this, so...:

Questions (in order of fine-grainedness):
- is intel-agp the right place to reinit such things, or should
  something be changed in a more global way? Would other drivers
  be responsible for that instead?
- should we have infrastructure available which records AGP state
  in all its nicety in various variables, with chipset-specific
  access functions (AGP mode, memory setup, ...)?
  That way we'd be able to implement one chipset-agnostic
  suspend/resume, which could be a heavenly thing
  considering the amount of different chipsets...
  (IOW, we should perhaps focus on maintaining an abstract device state
   tracking, not blindly push those I/O instructions out to the
   device and forget about actual device state)
- should we just implement a plain'n stupid I/O register array
  for each chipset which denotes the registers that need resume
  maintenance and also records their pre-suspend values? (DUMB)
- or even (shudder) simply always recover the entire PCI I/O space
  no matter which chipset it is?

I really want to get this improved, so any ideas how it should
best be updated to get a nice clean generic suspend/resume functionality
for all chipsets? (at least Intel, or even better for all types)

And it would be very useful to add a generic function for those
repeated agp_bridge->dev->device == PCI_DEVICE_... checks
which takes a PCI ID array input... (inline or real function, doesn't matter).


Andreas Mohr

  parent reply	other threads:[~2007-01-30 23:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-16 13:57 2.6.20-rc5: usb mouse breaks suspend to ram Pavel Machek
2007-01-16 14:08 ` Dmitry Torokhov
2007-01-16 14:24   ` Pavel Machek
2007-01-16 21:25     ` Dmitry Torokhov
2007-01-16 21:47       ` Pavel Machek
2007-01-17 15:44         ` [linux-usb-devel] " Alan Stern
2007-01-17  0:40       ` Andreas Mohr
2007-01-17  0:57         ` Pavel Machek
2007-01-18 11:51           ` intel-agp PM experiences (was: 2.6.20-rc5: usb mouse breaks suspend to ram) Andreas Mohr
2007-01-18 22:05             ` Nigel Cunningham
2007-01-18 23:16             ` Pavel Machek
2007-01-22  4:45               ` Wang Zhenyu
2007-01-23  9:44                 ` i965 testers wanted (Re: intel-agp PM experiences) Pavel Machek
2007-01-23 14:46                   ` Sunil Naidu
2007-01-29 22:05                   ` Frédéric Riss
2007-01-29 22:10                     ` Pavel Machek
2007-01-29 22:21                       ` Frédéric Riss
2007-01-29 22:34                         ` Dave Jones
2007-01-29 21:30                 ` intel-agp PM experiences (was: 2.6.20-rc5: usb mouse breaks suspend to ram) Andreas Mohr
2007-01-30 12:36                   ` Wang Zhenyu
2007-01-30 13:05                     ` Andreas Mohr
2007-01-30 23:39                     ` Andreas Mohr [this message]
2007-05-01 14:59               ` [PATCH -mm] working 3D/DRI intel-agp.ko resume for i815 chip; Intel chipset testers wanted! (was: Re: intel-agp PM experiences ...) Andreas Mohr
2007-05-02 10:17                 ` Pavel Machek
2007-05-03 15:47                   ` Dave Jones
2007-05-05 17:56                   ` Andreas Mohr
2007-05-10  6:44                     ` Andreas Mohr

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: intel-agp PM experiences (was: 2.6.20-rc5: usb mouse breaks suspend to ram)' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).