|
From: Jon M. <jo...@bl...> - 2001-08-24 22:55:59
|
Hello,
The following patch adds logo support for CFB2 displays (2 bit grayscale), and
also adds a configuration option CONFIG_FB_LOGO to disable the boot logo.
-Jon
diff -Nur linux-2.4.7-rmk3/drivers/video/Config.in linux-2.4.7-rmk3-bluemug1/drivers/video/Config.in
--- linux-2.4.7-rmk3/drivers/video/Config.in Tue Aug 21 10:52:40 2001
+++ linux-2.4.7-rmk3-bluemug1/drivers/video/Config.in Tue Aug 21 11:08:30 2001
@@ -9,6 +9,7 @@
if [ "$CONFIG_FB" = "y" ]; then
define_bool CONFIG_DUMMY_CONSOLE y
+ bool ' Boot logo support' CONFIG_FB_LOGO
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_PCI" = "y" ]; then
tristate ' nVidia Riva support (EXPERIMENTAL)' CONFIG_FB_RIVA
diff -Nur linux-2.4.7-rmk3/drivers/video/fbcon.c linux-2.4.7-rmk3-bluemug1/drivers/video/fbcon.c
--- linux-2.4.7-rmk3/drivers/video/fbcon.c Wed Jul 4 22:56:00 2001
+++ linux-2.4.7-rmk3-bluemug1/drivers/video/fbcon.c Tue Aug 21 10:57:58 2001
@@ -646,6 +646,7 @@
nr_cols = p->var.xres/fontwidth(p);
nr_rows = p->var.yres/fontheight(p);
+#ifdef CONFIG_FB_LOGO
if (logo) {
/* Need to make room for the logo */
int cnt;
@@ -684,6 +685,7 @@
conp->vc_video_erase_char,
conp->vc_size_row * logo_lines);
}
+#endif /* CONFIG_FB_LOGO */
/*
* ++guenther: console.c:vc_allocate() relies on initializing
@@ -2130,6 +2132,10 @@
int i, j, n, x1, y1, x;
int logo_depth, done = 0;
+#ifndef CONFIG_FB_LOGO
+ return 0;
+#else
+
/* Return if the frame buffer is not mapped */
if (!fb)
return 0;
@@ -2307,6 +2313,34 @@
done = 1;
}
#endif
+#if defined(CONFIG_FBCON_CFB2)
+ if (depth == 2 && p->type == FB_TYPE_PACKED_PIXELS) {
+ src = logo;
+ for( y1 = 0; y1 < LOGO_H; y1++) {
+ dst = fb + y1*line + x/8;
+ for( x1 = 0; x1 < LOGO_W/8; x1++) {
+ u8 a, i;
+ u8 q = *src++;
+ q = (q << 4) | (q >> 4);
+ for (a=0,i=0; i<4; i++) {
+ a = a << 2;
+ if (q & 0x1)
+ a |= 0x3;
+ q = q >> 1;
+ }
+ fb_writeb (a, dst++);
+ for (a=0,i=0; i<4; i++) {
+ a = a << 2;
+ if (q & 0x1)
+ a |= 0x3;
+ q = q >> 1;
+ }
+ fb_writeb (a, dst++);
+ }
+ }
+ done = 1;
+ }
+#endif
#if defined(CONFIG_FBCON_CFB8) || defined(CONFIG_FB_SBUS)
if (depth == 8 && p->type == FB_TYPE_PACKED_PIXELS) {
/* depth 8 or more, packed, with color registers */
@@ -2438,6 +2472,8 @@
* thing exist in reality?) */
return done ? (LOGO_H + fontheight(p) - 1) / fontheight(p) : 0 ;
+
+#endif /* CONFIG_FB_LOGO */
}
/*
|