Re: Hardware state saving & X

Pavel Machek
2003-10-15T19:13:12Z

Hi!

> > > Well, it depends on what X (and in general userspace) needs to know on a
> > > power-state transition. Alan, how does/will X behave differently for each
> > > power state that we can enter?
> >
> > Different scripts should run on apm -s (BIOS saves most of hw state)
> > and S3 (we have to save most of hw state).
>
> The fact that different behavior exists is completely obvious (refer to
> the question and documentation). The question was *how* it was different
> from a userpsace perspective. I.e. what exactly is saved, and what isn't.
>
> Under APM, the BIOS handles the state transition, but it does not know
> each device initimately, so the OS still has to handle some of the device
> state.

I guess you answered yourself ;-). X is hardware driver. On some
machines, video is handled by bios during apm -s. That's not the case
during S3. Therefore X wants to know if it should do hardware saving
or not.

[Of course, X might want to save allways (simulated console switch).]

> Video devices have an int10 call to save/restore state, which is what the
> APM BIOS uses.

Could you elaborate? I'm not aware of int10 call doing that... That
would solve S3 video problems, right? I was told that we can't call
int10 at all from real mode because pci might not yet be intialized
during acpi_wakeup.S; but it works on machines I have here.

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