Messages in this thread | | | Date | Mon, 27 Jul 1998 23:16:13 +0200 (CEST) | From | Geert Uytterhoeven <> | Subject | Re: 2.1.111+l-con111: logo in 16bpp (w/patch) |
| |
On Mon, 27 Jul 1998, Alexander V. Lukyanov wrote: > 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. > > --- 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);
Thanks! I'll apply it.
Greetings,
Geert
-- Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/ Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium
- 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
| |