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 > p

[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 possibl

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 oka

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-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 requ

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 switchin

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 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 consol

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 a

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 sing

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

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_co

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 conso

[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