Re: S3 High Speed text font support in vgacon.c [patch 2.1.112]

koen.gadeyne@barco.com
Fri, 31 Jul 98 12:23:21 +0200


>
> Hi all
>
> S3:
> VGA graphics chip used in most of the current PCs

hmm...

> S3 High Speed text font mode:
> Special organization of font in VGA's memory so that the chip can
> display at higher dot clocks without memory bandwith starvation. Chip has
> special mode in which when set, all (_ALL_) the accesses to video RAM are
> translated so that the font loading is made compatible with the traditional
> font organization.
>
> Current solution:
> SVGATextMode which is used to setup this mode of operation and also
> acts as wrapper around immediate and mandatory setfont.

For completeness' sake, SVGATextMode has to make sure high-speed text mode is
enabled before loading a font, because the font is stored differently in
memory in high-speed text mode. That is also why font loading is _mandatory_
in this case, since the "old" stored font is not formatted correctly in
memory.

> Disadvantages of the current solution:
> * You must load some disk font when setting better video mode
> (no chance of leaving the old BIOS-related font).

Same thing when implemented in the kernel: the old stored font will need to
be replaced as well. It's not because it is "hidden" in the kernel that it
does not happen.

SVGATextMode could be adapted to read the old font before enabling HSText
and restore if afterwards, which would also allow you to skip font-loading.
The change is trivial.

> * No elegant method of loading of custom fonts.

How so? What is "elegant"? SVGATextMode allows you to select a font for each
possible character size in the /etc/TextConfig file.

SVGATextMode relies on setfont to load fonts, so if the font-loading is not
elegant, it's because setfont isn't elegant :-)

> This patch's solution:
> Kernel checks for S3 card during boot and by internal getfont/setfont
> pair sets up the high speed mode with leaving the current font unchanged.

My personal opinion is that there may be more disadvantages than advantages
to this. You're the first to tell me that the current SVGATextMode
implementation is not what you want. That doesn't mean noone agrees with
you, but everyone who writes free software will tell you that people almost
never tell you when your program works well, while they are much more
inclined to complain if it doesn't work as expected...

Anyway, S3 may choose to drop "high-speed textmode" from their future chips
at any moment in time, and then the Linux kernel may actually cause your
text screen to go bungee-jumping with a non-elastic rope.

Actually, the trend nowadays is downward for textmodes: all those new cards
using synchronous memories have very low textmode performance (due to the
high latency of typical synchronous memories compared to the old DRAM, which
is very bad for the hectic memory-access method used by textmodes.

Anyway, I am not questionning the validity of your patch (can't test it,
since I have neither an S3 card nor am I running any of the 2.1.xxx
kernels).

Koen.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html