Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO+KD_GRAPHICS mode

2007-03-12 Thread Pavel Machek
Hi! > When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the > SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely > or until the task is interrupted. This patch tests if a console switch > can occur in set_console() and returns early if a console switch is not >

[PATCH] Software Suspend: Fix suspend when console is in VT_AUTO+KD_GRAPHICS mode

2007-03-12 Thread Andrew Johnson
Hi All, When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely or until the task is interrupted. This patch tests if a console switch can occur in set_console() and returns early if a console switch is not

[PATCH] Software Suspend: Fix suspend when console is in VT_AUTO+KD_GRAPHICS mode

2007-03-12 Thread Andrew Johnson
Hi All, When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely or until the task is interrupted. This patch tests if a console switch can occur in set_console() and returns early if a console switch is not

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO+KD_GRAPHICS mode

2007-03-12 Thread Pavel Machek
Hi! When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely or until the task is interrupted. This patch tests if a console switch can occur in set_console() and returns early if a console switch is not

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-10 Thread Pavel Machek
Hi1 > > It should explain why it is okay to proceed when we can't change to > > text console. > > > See updated comment in attached patch. It's really up to the caller to > decide what to do if we can't switch the console - currently all callers > ignore the return code so I assume that it's

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-10 Thread Pavel Machek
Hi! > > ...how does qpe know when to repaint the screen, anyway? > > QPE doesn't need to repaint the screen after wake-up - the framebuffer > memory is retained so the PXA270 lcd controller simply displays what was > last on the screen when it is re-enabled. That probably means QPE is broken on

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-10 Thread Pavel Machek
Hi! ...how does qpe know when to repaint the screen, anyway? QPE doesn't need to repaint the screen after wake-up - the framebuffer memory is retained so the PXA270 lcd controller simply displays what was last on the screen when it is re-enabled. That probably means QPE is broken on

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-10 Thread Pavel Machek
Hi1 It should explain why it is okay to proceed when we can't change to text console. See updated comment in attached patch. It's really up to the caller to decide what to do if we can't switch the console - currently all callers ignore the return code so I assume that it's okay to

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Andrew Johnson
On Fri, 2007-09-03 at 13:19 -0800, Pavel Machek wrote: > Hi! > > > > > -void set_console(int nr) > > +extern char vt_dont_switch; > > + > > What does this variable do and why do we want to use it here? > It's needed in set_console(). Console switch will fail if this is true. > 'if (' > > >

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Andrew Johnson
On Fri, 2007-09-03 at 21:13 +, Pavel Machek wrote: > Hi! > > > > > So... if current console is graphical, we leave X accessing the > > > > console... That's bad, because video state is not going to be > > > > restored...? > > > > > > A graphical console is not necessarily X. Is there any

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Pavel Machek
Hi! > > So... if current console is graphical, we leave X accessing the > > console... That's bad, because video state is not going to be > > restored...? > > A graphical console is not necessarily X. Is there any requirement for > there to be a single VT that isn't in text mode? The vt

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Pavel Machek
Hi! > > > So... if current console is graphical, we leave X accessing the > > > console... That's bad, because video state is not going to be > > > restored...? > > > > A graphical console is not necessarily X. Is there any requirement for > > there to be a single VT that isn't in text mode?

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Pavel Machek
Hi! > > > So... if current console is graphical, we leave X accessing the > > > console... That's bad, because video state is not going to be > > > restored...? > > > > A graphical console is not necessarily X. Is there any requirement for > > there to be a single VT that isn't in text mode? The

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Andrew Johnson
On Fri, 2007-09-03 at 15:34 +, Matthew Garrett wrote: > On Fri, Mar 09, 2007 at 10:08:05AM +0100, Pavel Machek wrote: > > > So... if current console is graphical, we leave X accessing the > > console... That's bad, because video state is not going to be > > restored...? > > A graphical

RE: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Andrew Johnson
Matthew Garrett wrote: > On Fri, Mar 09, 2007 at 10:08:05AM +0100, Pavel Machek wrote: > > > So... if current console is graphical, we leave X accessing the > > console... That's bad, because video state is not going to be > > restored...? > > A graphical console is not necessarily X. Is there

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Matthew Garrett
On Fri, Mar 09, 2007 at 10:08:05AM +0100, Pavel Machek wrote: > So... if current console is graphical, we leave X accessing the > console... That's bad, because video state is not going to be > restored...? A graphical console is not necessarily X. Is there any requirement for there to be a

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Pavel Machek
Hi! > When the console is in VT_AUTO/KD_GRAPHICS mode, switching to the > SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinately > or until the task is interrupted. The following patch tests if a > console switch can occur in set_console() and returns early if a console >

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Pavel Machek
Hi! When the console is in VT_AUTO/KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinately or until the task is interrupted. The following patch tests if a console switch can occur in set_console() and returns early if a console switch is

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Matthew Garrett
On Fri, Mar 09, 2007 at 10:08:05AM +0100, Pavel Machek wrote: So... if current console is graphical, we leave X accessing the console... That's bad, because video state is not going to be restored...? A graphical console is not necessarily X. Is there any requirement for there to be a single

RE: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Andrew Johnson
Matthew Garrett wrote: On Fri, Mar 09, 2007 at 10:08:05AM +0100, Pavel Machek wrote: So... if current console is graphical, we leave X accessing the console... That's bad, because video state is not going to be restored...? A graphical console is not necessarily X. Is there any

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Andrew Johnson
On Fri, 2007-09-03 at 15:34 +, Matthew Garrett wrote: On Fri, Mar 09, 2007 at 10:08:05AM +0100, Pavel Machek wrote: So... if current console is graphical, we leave X accessing the console... That's bad, because video state is not going to be restored...? A graphical console is not

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Pavel Machek
Hi! So... if current console is graphical, we leave X accessing the console... That's bad, because video state is not going to be restored...? A graphical console is not necessarily X. Is there any requirement for there to be a single VT that isn't in text mode? The vt switching

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Pavel Machek
Hi! So... if current console is graphical, we leave X accessing the console... That's bad, because video state is not going to be restored...? A graphical console is not necessarily X. Is there any requirement for there to be a single VT that isn't in text mode? The vt switching

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Pavel Machek
Hi! So... if current console is graphical, we leave X accessing the console... That's bad, because video state is not going to be restored...? A graphical console is not necessarily X. Is there any requirement for there to be a single VT that isn't in text mode? The vt switching is a

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Andrew Johnson
On Fri, 2007-09-03 at 21:13 +, Pavel Machek wrote: Hi! So... if current console is graphical, we leave X accessing the console... That's bad, because video state is not going to be restored...? A graphical console is not necessarily X. Is there any requirement for

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-09 Thread Andrew Johnson
On Fri, 2007-09-03 at 13:19 -0800, Pavel Machek wrote: Hi! -void set_console(int nr) +extern char vt_dont_switch; + What does this variable do and why do we want to use it here? It's needed in set_console(). Console switch will fail if this is true. 'if (' +

RE: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-08 Thread Andrew Johnson
Daniel Drake wrote: > Andrew Johnson wrote: > > When the console is in VT_AUTO/KD_GRAPHICS mode, switching to the > > SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinately > > or until the task is interrupted. The following patch tests if a > > console switch can occur in

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-08 Thread Daniel Drake
Andrew Johnson wrote: When the console is in VT_AUTO/KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinately or until the task is interrupted. The following patch tests if a console switch can occur in set_console() and returns early if a

[PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-08 Thread Andrew Johnson
Hi Pavel, When the console is in VT_AUTO/KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinately or until the task is interrupted. The following patch tests if a console switch can occur in set_console() and returns early if a console switch is

[PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-08 Thread Andrew Johnson
Hi Pavel, When the console is in VT_AUTO/KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinately or until the task is interrupted. The following patch tests if a console switch can occur in set_console() and returns early if a console switch is

Re: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-08 Thread Daniel Drake
Andrew Johnson wrote: When the console is in VT_AUTO/KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinately or until the task is interrupted. The following patch tests if a console switch can occur in set_console() and returns early if a

RE: [PATCH] Software Suspend: Fix suspend when console is in VT_AUTO/KD_GRAPHICS mode

2007-03-08 Thread Andrew Johnson
Daniel Drake wrote: Andrew Johnson wrote: When the console is in VT_AUTO/KD_GRAPHICS mode, switching to the SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinately or until the task is interrupted. The following patch tests if a console switch can occur in set_console()