All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix vgacon blanking
@ 2005-10-20 16:13 Pozsar Balazs
  2005-10-20 20:27 ` Bob Copeland
  2005-10-21  0:01 ` Antonino A. Daplas
  0 siblings, 2 replies; 6+ messages in thread
From: Pozsar Balazs @ 2005-10-20 16:13 UTC (permalink / raw)
  To: linux-kernel


Hi all,

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: Pozsar Balazs <pozsy@uhulinux.hu>


Please review and apply,


-- 
pozsy


--- orig/drivers/video/console/vgacon.c	2005-10-11 03:19:19.000000000 +0200
+++ pozsy/drivers/video/console/vgacon.c	2005-10-20 15:41:18.000000000 +0200
@@ -575,6 +510,7 @@ static void vga_set_palette(struct vc_da
 {
 	int i, j;
 
+	vga_w(state.vgabase, VGA_PEL_MSK, 0xff);
 	for (i = j = 0; i < 16; i++) {
 		vga_w(state.vgabase, VGA_PEL_IW, table[i]);
 		vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2);
@@ -717,6 +653,7 @@ static void vga_pal_blank(struct vgastat
 {
 	int i;
 
+	vga_w(state->vgabase, VGA_PEL_MSK, 0xff);
 	for (i = 0; i < 16; i++) {
 		vga_w(state->vgabase, VGA_PEL_IW, i);
 		vga_w(state->vgabase, VGA_PEL_D, 0);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-10-21  0:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4ZLja-4gH-5@gated-at.bofh.it>
2005-10-20 21:23 ` [PATCH] fix vgacon blanking Bodo Eggert
2005-10-20 21:54   ` Pozsar Balazs
2005-10-21  0:17   ` Antonino A. Daplas
2005-10-20 16:13 Pozsar Balazs
2005-10-20 20:27 ` Bob Copeland
2005-10-21  0:01 ` Antonino A. Daplas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.