Console + vgacon patch

Martin Mares (
Tue, 7 Jul 1998 00:59:18 +0200


During last few days (and nights ;-]) I was playing with the console driver
and trying to get back as much of the original vga console performance as
possible and also fixing lots of other problems. The result is this patch,
relative to latest Geert's fixes, tested on both vgacon and fbcon+vesafb,
but hopefully working on other architectures as well.

Available from

o vgacon supports scrollback
o vgacon uses fast hardware scrolling when available
o vgacon supports changeable fonts and console resizing
o Generic console code again allows character buffer of the foreground
console to be contained directly in video ram. Added few hooks for
such consoles:
con_set_origin - Calculate start of screen buffer for
foreground console
con_vram_scroll - Try scrolling the whole screen buffer
con_save_screen - Save screen contents to real screen buffer
o con_switch now returns whether to redraw or not
o vgacon: Original bootup screen retained when starting the console.
o Better coalescing of multiple characters to single putcs
o Did some shuffling of subroutines to make the code more readable.
o Added back the no-scroll command-line option.
[news against my previous pre-patch:]
o Clipping (aka selection) from scroll-back works
o Changed configuration on all architectures -- all console settings
now reside within single sub-menu.
o Moved declarations of console subsystem routines to vt_kern.h
o Coalesced both version of vc_resize into one.
o Cleaned up font switching.
o Killed con_adjust_height
o Cleaned up allocation of new consoles (calling vc_allocate even
in the init instead of duplicating code).
o Include logo on i386 only with CONFIG_FB as the text mode logo
is very ugly.
o When only the vgacon is configured, omit lots of screen refreshing
o VGA videomem access is now arch-dependent and whereever possible,
it's compiled just as direct memory access with necessary address
o Moved all screen buffer access functions to <linux/vt_buffer.h>
o memsetw and memcpyw renamed to scr_memsetw and scr_memcpyw to match
rest of buffer access functions. Implemented scr_memcpyw as memcpy
whereever possible.
o Updated fbcon and compatcon to use the new consw hooks.
o Removed MIN_NR_CONSOLES as it's useless with the new allocation.
o Removed txtcon as it isn't used anywhere and it's out of date.

Things to solve:
o Get screen blanking work.
o Make better screen resizing, possibly utilizing information
contained in scrollback buffer.
o Make it compile without CONFIG_VT.
o Get monochrome adapters to work (just now attributes are handled
o Browse through all the FIXME's in the code.
o Finish console code cleanup. The old code is _really_messy_ (TM),
just a big pile of features stacked one over another.
o Fold console data structures, kill those lots of arrays.

Have a nice $(currentdaypart)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to