Re: [AD] fbcon VT switch problem

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2005-12-27, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> On Wed, 2005-12-28 at 00:11 +1100, Peter Wang wrote:
> > There was a problem with the fbcon driver and VT switching.  If the
> > vsync implementation was emulated using `retrace_count' then it would
> > hang when trying to restore the video mode after a VT switch because
> > timer "interrupts" are disabled during that time.
> > 
> > I have committed the following patch.
> 
> Hm, I can't say I understand how VT switching affects the timer thread..
> but in any case, wouldn't it be safer to put the check for in_fb_restore
> inside the busy loop, not before it?

What happens is that when a VT switch return is requested come_back() is
called in a signal handler, via vt_switch_requested() and
poll_console_switch().  The first thing that come_back() calls is
_unix_bg_man->disable_interrupts(), then gfx_driver->restore_video_state().
fb_restore() happens to call fb_vsync(), which might try to use retrace_count
and end up in an endless loop.

The problem happens in a single thread of execution so it should not be
any safer to put the check inside the loop.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/