linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* patch fixing background next to penguin logo in monochrome
@ 2004-08-11 19:56 Petr Stehlik
  2004-08-11 22:23 ` Antonino A. Daplas
  0 siblings, 1 reply; 11+ messages in thread
From: Petr Stehlik @ 2004-08-11 19:56 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Geert Uytterhoeven, Christian T. Steigies

Hi all,

I have developed a simple workaround for a problem existing in
framebuffer when it interprets VGA attribute bits in monochrome mode.
Instead of empty chars we get underlines - you can see what I mean at
http://joy.sophics.cz/horizlines.jpg - the image shows the background
where the penguin logo will appear during linux kernel boot up. The logo
then looks like incorrectly drawn (due to the horizontal lines) and
people are complaining or reporting this as a sign of a kernel problems
with their hardware setup or something.

When Geert told me in linux-m68k that this issue was a years known
problem and a quite complicated thing to fix I tried to come up with a
simpler solution and here it is: the patch attached below simply erases
the background next to the penguin(s) while it paints them. The result
is clear screen with just the penguin logo. 

The patch has been tested on my Atari Falcon both in normal and inverse
monochrome mode. It's so simple that I hope it gets accepted in the
kernel.

Please CC: me in replies as I am not subscribed to this list.

Thanks.

Petr

Index: drivers/video/fbcon.c
===================================================================
RCS file: /home/linux-m68k/cvsroot/linux/drivers/video/Attic/fbcon.c,v
retrieving revision 1.1.1.2.2.6
diff -u -r1.1.1.2.2.6 fbcon.c
--- drivers/video/fbcon.c	26 Aug 2003 03:13:09 -0000	1.1.1.2.2.6
+++ drivers/video/fbcon.c	11 Aug 2004 19:50:16 -0000
@@ -2433,12 +2433,16 @@
 		    dst = fb + (y1%4)*8192 + (y1>>2)*line + x/8;
 		else
 		    dst = fb + y1*line + x/8;
-		for( x1 = 0; x1 < LOGO_LINE; ++x1 ) {
+		for( x1 = 0; x1 < (p->var.xres-x)/8; ++x1 ) {
+		    char c;
+		    if (x1 < LOGO_LINE)
+			c = *src++ ^ inverse; /* logo data */
+		    else
+			c = ~inverse; /* erase background to end of line */
 #ifndef CONFIG_HP300
-		    fb_writeb(*src++ ^ inverse, dst++);
+		    fb_writeb(c, dst++);
 #else /* CONFIG_HP300 */
 		    /* hack hack -- make it work with topcat in pseudomono mode */
-		    char c = *src++ ^ inverse;
 		    fb_writeb((c >> 7) & 1, dst++);
 		    fb_writeb((c >> 6) & 1, dst++);
 		    fb_writeb((c >> 5) & 1, dst++);




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

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

end of thread, other threads:[~2004-08-17  7:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-11 19:56 patch fixing background next to penguin logo in monochrome Petr Stehlik
2004-08-11 22:23 ` Antonino A. Daplas
2004-08-12 12:02   ` Petr Stehlik
2004-08-12 20:01     ` Geert Uytterhoeven
2004-08-12 22:30       ` Antonino A. Daplas
2004-08-12 23:53         ` Antonino A. Daplas
2004-08-13  8:05           ` Geert Uytterhoeven
2004-08-15  0:43             ` Antonino A. Daplas
2004-08-15 12:25         ` Geert Uytterhoeven
2004-08-16  3:11           ` Antonino A. Daplas
2004-08-17  7:45             ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).