Messages in this thread Patch in this message | | | From | "Alexander V. Lukyanov" <> | Date | Mon, 27 Jul 1998 21:46:16 +0400 | Subject | 2.1.111+l-con111: logo in 16bpp (w/patch) |
| |
I noticed that boot logo in 16bpp looks wrong (no blue color). It turned out to be negative shift, which zeroes value on ix86. The following patch fixes the problem for me.
BTW, l-con111 makes first console invisible, I had to change 12 back to 0 in take_over_console call in fbmem.c.
--- fbcon.c Mon Jul 27 19:32:45 1998 +++ linux-2.1/drivers/video/fbcon.c Mon Jul 27 19:55:49 1998 @@ -1516,6 +1516,11 @@ return 0; } +static inline unsigned safe_shift(unsigned d,int n) +{ + return n<0 ? d>>-n : d<<n; +} + __initfunc(static int fbcon_show_logo( void )) { struct display *p = &fb_display[fg_console]; /* draw to vt in foreground */ @@ -1665,9 +1670,9 @@ for( y1 = 0; y1 < LOGO_H; y1++ ) { dst = fb + y1*line + x*bdepth; for( x1 = 0; x1 < LOGO_W; x1++, src++ ) { - val = ((linux_logo_red[*src-32] & redmask) << redshift) | - ((linux_logo_green[*src-32] & greenmask) << greenshift) | - ((linux_logo_blue[*src-32] & bluemask) << blueshift); + val = safe_shift((linux_logo_red[*src-32] & redmask), redshift) | + safe_shift((linux_logo_green[*src-32] & greenmask), greenshift) | + safe_shift((linux_logo_blue[*src-32] & bluemask), blueshift); #ifdef __LITTLE_ENDIAN for( i = 0; i < bdepth; ++i ) #else Alexander.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |