Re: [PM] Passing suspend level down to drivers

Pavel Machek
2003-09-09T23:08:14Z

Hi!

> > I do think this is a bit complicated. I believe passing level, along
> > with type of the suspend (aka swsusp vs. S4bios) should be enough.
>
> What about suspend-to-ram, APM, and runtime states?

I'd not worry about runtime states for now. [If user wants to sleep
one device, we probably can allow that, but I do not think it is
reasonable to do much more for 2.6.X]. That leaves us with:

APM suspend-to-ram
APM suspend-to-disk
ACPI standby (S1)
ACPI suspend-to-ram (S3)
ACPI suspend-to-disk (S4bios)
swsusp

Do we want to support ACPI S2? I don't think so. That list is not
*that* bad.

> That actually makes it quite a bit more complicated, globally. By forcing
> the policy down to the drivers, you force each one to interpret the value
> themselves and make the decision. By doing it centrally, the only thing
> the low-level drivers have to worry about is going into the state.

Yes, but you'll have to have central database saying "nvidia VGA needs
to be in D1 during S3". I don't think that's good idea. Better put it
into the driver... Hopefully not many drivers will need such hacks.

Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]