On Mon, 1 Jan 2001, Alan Cox wrote:
> 2.4.0test13pre7-ac1
> o     Update logo palette handling                    (Geert Uytterhoeven)

I forgot to fix one case: for DIRECTCOLOR visuals with 15 <= depth <= 23, the
pixel values no longer have to be offset by 16 since we use colors 0-15 now.
In addition it should work for depths starting at 12 now as well.

I'll send the full patch (including this fix) to Linus.

--- logo16-2.4.0-current/drivers/video/fbcon.c.orig     Mon Jan  1 23:35:27 2001
+++ logo16-2.4.0-current/drivers/video/fbcon.c  Tue Jan  2 13:42:14 2001
@@ -2143,15 +2143,15 @@
                    }
                }
            }
-           else if (depth >= 15 && depth <= 23) {
-               /* have 5..7 bits per color, using 16 color image */
+           else if (depth >= 12 && depth <= 23) {
+               /* have 4..7 bits per color, using 16 color image */
                unsigned int pix;
                src = linux_logo16;
                bdepth = (depth+7)/8;
                for( y1 = 0; y1 < LOGO_H; y1++ ) {
                    dst = fb + y1*line + x*bdepth;
                    for( x1 = 0; x1 < LOGO_W/2; x1++, src++ ) {
-                       pix = (*src >> 4) | 0x10; /* upper nibble */
+                       pix = *src >> 4; /* upper nibble */
                        val = (pix << redshift) |
                              (pix << greenshift) |
                              (pix << blueshift);
@@ -2161,7 +2161,7 @@
                        for( i = bdepth-1; i >= 0; --i )
 #endif
                            fb_writeb (val >> (i*8), dst++);
-                       pix = (*src & 0x0f) | 0x10; /* lower nibble */
+                       pix = *src & 0x0f; /* lower nibble */
                        val = (pix << redshift) |
                              (pix << greenshift) |
                              (pix << blueshift);

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to