linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Grover, Andrew" <andrew.grover@intel.com>
Cc: Patrick Mochel <mochel@osdl.org>,
	linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: RE: Subtle semantic issue with sleep callbacks in drivers
Date: 14 Apr 2003 19:40:25 +0200	[thread overview]
Message-ID: <1050342025.6537.79.camel@zion.wanadoo.fr> (raw)
In-Reply-To: <F760B14C9561B941B89469F59BA3A84725A260@orsmsx401.jf.intel.com>

On Mon, 2003-04-14 at 19:09, Grover, Andrew wrote:

> Topic drift...
> 
> After asking around internally, it sounds like we should not be doing a
> video re-POST on wakeup. Windows only used to in order to workaround
> buggy video drivers, according to what I've heard.
> 
> Ben obviously PPC is ahead of the pack on this stuff (congrats) but I
> did just want to put forward the idea that when we're all done with this
> stuff on all archs, we will hopefully not be regularly re-POSTing the
> video bios.

But how ? let's make clear what we call POST first ...

If the card is powered off, it must be POSTed to be brought back to
life. Either we do it by running the BIOS code (probably what you are
talking about and should be deprecated), or the driver "knows" how to
restore the chip from power off. I don't know if APM/ACPI provides
other ways, I suspect the APM BIOS will re-POST the card by itself
or else, things wouldn't work today. I don't know about ACPI.

What I mean here is that none of our drivers know how to bring 
back a chip as complicated as a radeon or a nvidia up from power off,
this requires intimate knowledge of the chip internals, the way it's
wired on a given board, etc...

On pmacs, the ROM does nothing for us. On wakeup from sleep, I basically
get control from the CPU right after the ROM figured out we are waking
up, that is a few instructions after the CPU itself is brought back from
power off, thus all HW is either just powered on by the PM microcontroller,
or in the state I left it when going to sleep.

So on machines where the PM microcontroller shuts off the PCI/AGP slots,
I must be able to fully restore PCI devices like video chips from their
power-on state, which I don't know how to do unless I'm the chip/board
manufacturer for a lot of "complicated" chips, like video ones...

The ability to re-run the BIOS (or open firmware) under some kind of
emulation or vm86 is a way to "work around" this problem.

The issue is that the driver must be told what is/canbe done so it
knows in what state it will get the chip back, and if it can resume
it at all or should reject sleep.

Ben.


  reply	other threads:[~2003-04-14 17:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-14 17:09 Subtle semantic issue with sleep callbacks in drivers Grover, Andrew
2003-04-14 17:40 ` Benjamin Herrenschmidt [this message]
2003-04-23 15:29 ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2003-04-14 21:09 Grover, Andrew
2003-04-16 18:39 ` Patrick Mochel
2003-04-16 19:36   ` Benjamin Herrenschmidt
2003-04-17 13:35   ` Alan Cox
2003-04-17 14:48     ` Jeff Garzik
2003-04-17 15:09       ` John Bradford
2003-04-17 15:09         ` Jeff Garzik
2003-04-17 15:47           ` John Bradford
2003-04-17 15:56             ` Jeff Garzik
2003-04-17 16:24               ` Alan Cox
2003-04-18  7:37             ` Greg KH
2003-04-18  7:51               ` John Bradford
2003-04-18  9:10               ` Russell King
2003-04-18 11:18                 ` Alan Cox
2003-04-18 11:30               ` Alan Cox
2003-04-29  8:28         ` Pavel Machek
2003-04-17 14:59     ` John Bradford
2003-04-17 15:04       ` Alan Cox
2003-04-14 19:07 Grover, Andrew
2003-04-14 19:18 ` Benjamin Herrenschmidt
2003-04-14 19:56 ` Alan Cox
2003-04-23 15:34 ` Pavel Machek
2003-04-14 10:00 Benjamin Herrenschmidt
2003-04-14 10:11 ` Benjamin Herrenschmidt
2003-04-16 18:31 ` Patrick Mochel
2003-04-16 19:29   ` Benjamin Herrenschmidt
2003-04-23 15:32 ` Pavel Machek

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=1050342025.6537.79.camel@zion.wanadoo.fr \
    --to=benh@kernel.crashing.org \
    --cc=andrew.grover@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.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 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).