From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 23658 invoked from network); 27 Jul 1998 16:32:23 -0000 Received: from cs.cs.brown.edu (HELO cs.brown.edu) (128.148.32.2) by mail2.redhat.com with SMTP; 27 Jul 1998 16:32:23 -0000 Received: from boojum.cs.brown.edu (boojum.cs.brown.edu [128.148.38.166]) by cs.brown.edu (8.8.5/8.7.1) with ESMTP id MAA16806 for ; Mon, 27 Jul 1998 12:31:52 -0400 (EDT) From: Tim Rowley Received: (from tor@localhost) by boojum.cs.brown.edu (8.9.0/8.9.0) id MAA14631 for axp-list@redhat.com; Mon, 27 Jul 1998 12:31:51 -0400 (EDT) Message-Id: <199807271631.MAA14631@boojum.cs.brown.edu> Subject: 24-plane TGA console patch for 2.1.111 To: axp-list@redhat.com Date: Mon, 27 Jul 1998 12:31:51 -0400 (EDT) X-Mailer: ELM [version 2.4ME+ PL37 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit People wanting to run 2.1.111 on 24-plane TGA cards can use this patch, which changes the following: * config adds CFB32 automatically if TGA is enabled * turns off hardware cursor, which is otherwise left hanging wherever MILO left it * enable blanking I'm also sending this to Geert Uytterhoeven for inclusion in the official kernel source. -tor diff -u linux-2.1.111-orig/drivers/video/Config.in linux-2.1.111/drivers/video/Config.in --- linux-2.1.111-orig/drivers/video/Config.in Tue Jul 21 13:28:24 1998 +++ linux-2.1.111/drivers/video/Config.in Sun Jul 26 18:37:21 1998 @@ -157,11 +157,13 @@ fi fi if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_ATY" = "y" -o \ - "$CONFIG_FB_VESA" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" ]; then + "$CONFIG_FB_TGA" = "y" -o "$CONFIG_FB_VESA" = "y" -o \ + "$CONFIG_FB_VIRTUAL" = "y" ]; then define_bool CONFIG_FBCON_CFB32 y else if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \ - "$CONFIG_FB_VESA" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" ]; then + "$CONFIG_FB_TGA" = "m" -o "$CONFIG_FB_VESA" = "m" -o \ + "$CONFIG_FB_VIRTUAL" = "m" ]; then define_bool CONFIG_FBCON_CFB32 m fi fi diff -u linux-2.1.111-orig/drivers/video/tgafb.c linux-2.1.111/drivers/video/tgafb.c --- linux-2.1.111-orig/drivers/video/tgafb.c Wed Jul 22 16:40:04 1998 +++ linux-2.1.111/drivers/video/tgafb.c Sun Jul 26 19:42:23 1998 @@ -682,9 +682,9 @@ TGA_WRITE_REG(temp & 0x000fffff, TGA_CURSOR_BASE_REG); } - /* finally, enable video scan & cursor + /* finally, enable video scan (and pray for the monitor... :-) */ - TGA_WRITE_REG(0x05, TGA_VALID_REG); /* SCANNING and CURSOR */ + TGA_WRITE_REG(0x01, TGA_VALID_REG); /* SCANNING */ fb_var.xres = fb_var.xres_virtual = 640; fb_var.yres = fb_var.yres_virtual = 480; @@ -805,7 +805,13 @@ static void tgafbcon_blank(int blank, struct fb_info *info) { - /* Nothing */ + /* Should also do stuff here for vesa blanking -tor */ + + if (blank > 0) { + TGA_WRITE_REG(0x03, TGA_VALID_REG); /* SCANNING and BLANK */ + } else { + TGA_WRITE_REG(0x01, TGA_VALID_REG); /* SCANNING */ + } } /*