Commit 1a66ddcb authored by Pozsar Balazs's avatar Pozsar Balazs Committed by Linus Torvalds
Browse files

[PATCH] fix vgacon blanking

This patch fixes a long-standing vgacon bug: characters with the bright bit
set were left on the screen and not blacked out.  All I did was that I
lookuped up some examples on the net about setting the vga palette, and
added the call missing from the linux kernel, but included in all other
ones.  It works for me.

You can test this by writing something with the bright set to the
console, for example:
  echo -e "\e[1;31mhello there\e[0m"
and then wait for the console to blank itself (by default, after 10 mins
of inactivity), maybe making it faster using
  setterm -blank 1
so you only have to wait 1 minute.
Signed-off-by: default avatarPozsar Balazs <>
Cc: James Simmons <>
Cc: "Antonino A. Daplas" <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 2973dfdb
...@@ -579,6 +579,7 @@ static void vga_set_palette(struct vc_data *vc, unsigned char *table) ...@@ -579,6 +579,7 @@ static void vga_set_palette(struct vc_data *vc, unsigned char *table)
{ {
int i, j; int i, j;
vga_w(state.vgabase, VGA_PEL_MSK, 0xff);
for (i = j = 0; i < 16; i++) { for (i = j = 0; i < 16; i++) {
vga_w(state.vgabase, VGA_PEL_IW, table[i]); vga_w(state.vgabase, VGA_PEL_IW, table[i]);
vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2); vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2);
...@@ -721,6 +722,7 @@ static void vga_pal_blank(struct vgastate *state) ...@@ -721,6 +722,7 @@ static void vga_pal_blank(struct vgastate *state)
{ {
int i; int i;
vga_w(state->vgabase, VGA_PEL_MSK, 0xff);
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
vga_w(state->vgabase, VGA_PEL_IW, i); vga_w(state->vgabase, VGA_PEL_IW, i);
vga_w(state->vgabase, VGA_PEL_D, 0); vga_w(state->vgabase, VGA_PEL_D, 0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment