• Antonino Daplas's avatar
    [PATCH] fbcon: refinements for fbcon · f032365d
    Antonino Daplas authored
    1.  From Petr Vandrovec <vandrove@vc.cvut.cz>.
    
    Begin quote
    
            yesterday I finally found why 2.6.x has problems with taking
            over vgacon.  Problem is that take_over_console does:
    
      	if (IS_VISIBLE)
        	save_screen(i);
      	...
      	visual_init(i, 0);
      	...
    
            so code nicely saves screen contents, and calls visual_init,
            which calls fbcon's init, which in turn can issue vc_resize.  And this
            vc_resize will trigger read from vc->vc_origin.  But vc_origin still
            points to videomemory, not to the buffer where save_screen() copied
            its data.
    
    End quote
    
    So updating vc->vc_origin to point to screenbuf after the previous console
    deinitializes allows fbcon to correctly update the screen from the screen
    buffer.  This change makes the clearing of vram (using fillrect) unnecessary.
    
    2.  If FBINFO_MISC_MODESWITCH flag is set in info, do the set_par() in
    fbcon_switch() instead of piggy-backing the set_par() on fbcon_resize().  This
    preserves the current var, skipping the unnecessary fb_find_mode() step.
    Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    f032365d
fbcon.c 66.7 KB