On Mon, Jan 05, 2004 at 08:47:59PM -0800, Eric Wittry wrote:
>> vtSema is expected to be TRUE by the time xf86HandleColormaps() is
>> called.  Removing CMAP_LOAD_EVEN_IF_OFFSCREEN looks like the right 
>> thing to do.  The driver is responsible for setting vtSema it in 
>> ScreenInit at a point after which is it OK to access the hardware 
>> in graphics mode.  This is typically at or just after where the 
>> initial video mode is programmed.
>
>>From what I'm reading, both hear and elsewhere, it sounds like the driver
>should enable vtSema during ScreenInit and disable it during CloseScreen. 
>This sounds reasonable enough, but is there any other code that changes
>the value of vtSema?  The following is the only place in the Rendition
>driver code in CVS currently does anything with vtSema:  
>
>    /* From the renditionCloseScreen function in                    */
>    /* xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c */
>
>    if (pScreenInfo->vtSema)
>        renditionLeaveGraphics(pScreenInfo);
>
>    pScreenInfo->vtSema = FALSE;
>
>This code runs at the end of the Rendition driver's close screen function.
> Since the driver is never setting the vtSema flag, I would presume it is
>being done elsewhere.  (I presume that the vtSema flag is set because
>renditionLeaveGraphics is responsible for restoring text mode, and the
>driver tries to do this, though it sometimes locks the system in the
>process.)  Might the server set this flag after calling the InitScreen
>function just to make sure it is set properly, or do non-driver modules
>also change the value the vtSema flag?  

Yes, it does.  In xf86Init.c, just after the driver's ScreenInit is
called:

        /* The driver should set this, but make sure it is set anyway */
        xf86Screens[i]->vtSema = TRUE;

Also the higher level code takes care of setting and clearing it for
VT switching.

David
-- 
David Dawes
developer/release engineer                      The XFree86 Project
www.XFree86.org/~dawes
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to