lkml.org 
[lkml]   [2003]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: Subtle semantic issue with sleep callbacks in drivers
From
Date
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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.109 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site