Linux-kernel mailing list archive 1998-31,: Re: S3 High Speed text font support in vgacon.c [patch 2.1.112]

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

Martin Mares (mj@ucw.cz)
Sun, 2 Aug 1998 17:13:33 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Martin Mares: "Re: S3 High Speed text font support in vgacon.c [patch 2.1.112]"
- Previous message: Martin Mares: "Re: [PATCH] vgacon vga_can_do_64kb"

Hi,

> Current solution:
> SVGATextMode which is used to setup this mode of operation and also
> acts as wrapper around immediate and mandatory setfont.
>
> 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).

This is not a principial problem, only an implementation one. You can use
GIO_FONT to grab the current font, switch memory layout and use PIO_FONT (or
PIO_FONTX or KDFONTOP) to load it back.

> * No elegant method of loading of custom fonts.

Agreed, but again you can solve it in user space.
> 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.
> Additional wrapper is installed around kernel setfont so that normal userland
> setfont(8) utility is working. SVGATextMode is no longer maintainer of the
> high speed text font features and all the modes are running in high speed mode.
> S3 detection code shamelessly stolen from XFree86 (UNTESTED - no non-S3 card
> available around!).

Hmmm... I see several problems:

- The S3 detection routine is _not_ 100% reliable. This is the same
technique as used in arch/i386/boot/video.S and it's known to give
bogus results on some cards (i.e., sometimes telling that a non-S3
card is an S3).
- The fact that the card is an S3 is not enough to be sure that the
card supports the HS font feature. You would probably need a list
of all known PCI ID's which is not enough anyway since there were
non-PCI S3 cards.
- Putting zillions of features applicable only to several cards to
vgacon is not the right way to go.
- I'm not sure at all that the whole VGA font setting code belongs
to kernel space. I've left it in the kernel primary for compatibility
reasons and I think of removing it completely during the console
rewrite I plan to do in 2.3 days. It probably belongs to the same
place as mode programming does -- i.e., into some SVGATextMode-like
utility.

Have a nice fortnight

    --
    Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
    Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
    "The best way to accelerate Windows is at 9.8 m / sec^2"

    -
    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

- Next message: Martin Mares: "Re: S3 High Speed text font support in vgacon.c [patch 2.1.112]"
- Previous message: Martin Mares: "Re: [PATCH] vgacon vga_can_do_64kb"