Skip to contentSkip to conversation

vgacon: Workaround for resize bug in some chipsets

PATCH Bodo Eggert 5 participants 6 messages Nov 13, 2005 – Nov 14, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Antonino A. Daplas

+++ b/drivers/video/console/vgacon.c
+#define VGA_FONTWIDTH 8 /* VGA does not support fontwidths != 8 */

This is not true, VGA cards do support fontwidth=9, but the ninth column can only be blank or (optionally and only in the range of the IBM block chars) copied from the eighth column, cloning the behaviour of the MDA graphics card. If you disable this feature, you'll get 90x25 text resolution within standard VGA timings.

BTW while looking at this file:

1) I see ORIG_VIDEO_EGA_BX (defined to (screen_info.orig_video_ega_bx) being checked to be 0x10, but I don't find a place where the associated variable is set to this value. Nor do I get the meaning of this variable by reading it's name.

2) If the videomode is 7, the card is asumed not to be a VGA card. VGA does support videomode 7, so this test is wrong. However, I don't asume this mode to be used on normal systems as nobody complained.

I asume from the fragments I read that the correct fix would be to read the Display Combination Code for VGA (detects additional CGA and MDA adapters), then detect EGA (if it is, don't forget to check to check bit 3 of 0x487) and use the return code and finally to use the CRTC address from the BIOS (The video mode may be set to 5 or 6 in order to make a mouse driver work in Hercules graphics). In case of EGA, we'll have to detect additional adapters manually. (Unfortunaly I threw away my EGA-compatible monitor, so I don't know if I can test it.)

3) Having a text mode is tested by a blacklist of graphic modes. I don't think this is good, but I've not yet read everything in this file.

Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
#2 lore raw
Quoted 6 lines · Bodo Eggert
Quoted 2 lines · Antonino A. Daplas

+++ b/drivers/video/console/vgacon.c
+#define VGA_FONTWIDTH 8 /* VGA does not support fontwidths != 8 */

This is not true, VGA cards do support fontwidth=9, but the ninth column

Yes. What it should mean is that vgacon does not support fontwidths != 8.

Quoted 11 lines

can only be blank or (optionally and only in the range of the IBM block chars) copied from the eighth column, cloning the behaviour of the MDA graphics card. If you disable this feature, you'll get 90x25 text resolution within standard VGA timings.

BTW while looking at this file:

1) I see ORIG_VIDEO_EGA_BX (defined to (screen_info.orig_video_ega_bx) being checked to be 0x10, but I don't find a place where the associated variable is set to this value. Nor do I get the meaning of this variable by reading it's name.

Set at arch/i386/boot/video.S. It contains the contents of register bx after calling int 0x10 ah=0x12 bl=0x10.

Tony

#3 lore raw
Quoted 15 lines · Antonino A. Daplas
Quoted 11 lines · Bodo Eggert
Quoted 4 lines · Antonino A. Daplas

+++ b/drivers/video/console/vgacon.c
+#define VGA_FONTWIDTH 8 /* VGA does not support fontwidths != 8 */

This is not true, VGA cards do support fontwidth=9, but the ninth column

Quoted 4 lines

Yes. What it should mean is that vgacon does not support fontwidths != 8.

I think vgacon doesn't touch the 8/9 pixel setting, so the fonts are hw extended to 9 pixels by VGA in many modes.

--Mika

#4 lore raw
Quoted 15 lines · Mika Penttilä
Quoted 13 lines · Antonino A. Daplas
Quoted 9 lines · Bodo Eggert
Quoted 4 lines · Antonino A. Daplas

+++ b/drivers/video/console/vgacon.c
+#define VGA_FONTWIDTH 8 /* VGA does not support fontwidths
!= 8 */

This is not true, VGA cards do support fontwidth=9, but the ninth column

Quoted 8 lines
Quoted 5 lines

Yes. What it should mean is that vgacon does not support fontwidths != 8.

I think vgacon doesn't touch the 8/9 pixel setting, so the fonts are hw extended to 9 pixels by VGA in many modes.

It's not a hardware limitation, but vgacon is hardcoded to accept fonts that are only 8 pixels wide. You can try it by doing a setfont.

Tony

#5 lore raw
Followup to:  <[email protected]>
By author:    "Antonino A. Daplas" <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

I think vgacon doesn't touch the 8/9 pixel setting, so the fonts are hw extended to 9 pixels by VGA in many modes.

It's not a hardware limitation, but vgacon is hardcoded to accept fonts that are only 8 pixels wide. You can try it by doing a setfont.

The *font* is always 8 pixels wide. Whether or not you display it in 8- or 9-pixel mode is irrelevant to the formatting of the font.

In general, for vgacon, it should use the 9-pixel mode, at least by default.

-hpa

#6 lore raw
In reply to Bodo Eggert
Quoted 2 lines · Bodo Eggert, le Sun 13 Nov 2005 20:41:04 +0100, a écrit :

2) If the videomode is 7, the card is asumed not to be a VGA card. VGA does support videomode 7, so this test is wrong.

But IIRC, in that case, the VGA board just emulates a MDA adapter, so using it as an MDA adapter makes sense.

Regards,
Samuel