All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] wrong lcd splashscreen colors (pxa)
@ 2005-09-15 16:18 Francesco Mandracci
  2005-09-15 17:52 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Francesco Mandracci @ 2005-09-15 16:18 UTC (permalink / raw)
  To: u-boot

Hello world :)

it seems that the computation of colors in
common/lcd.c:lcd_display_bitmap() is wrong for green and blue
components. I checked on version 1.1.3 and on cvs.sf.net.

I'm working on a PXA270 but this seems general (as far as I understand).
The error is not evident until you use full colors (i.e. if color RGB
components/bytes are either 0x00 of 0xff).

------------------------------------------------------
                        bmp_color_table_entry_t cte = bmp->color_table[i];
                        ushort colreg =
                                ( ((cte.red)   << 8) & 0xf800) |
-                               ( ((cte.green) << 4) & 0x07e0) |
-                               ( (cte.blue) & 0x001f) ;
+                               ( ((cte.green) << 3) & 0x07e0) |
+                               ( ((cte.blue)  >> 3) & 0x001f) ;

 #ifdef CFG_INVERT_COLORS
                        *cmap = 0xffff - colreg;
 #else
                        *cmap = colreg;
 #endif
------------------------------------------------------

Hoping this helps.
Ciao
    Francesco Mandracci

PS
Thank you all for the great job: it's the first time I get to a
bootloader prompt (on a new hardware) after only about 6 hours of work.

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

end of thread, other threads:[~2005-09-16 10:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-15 16:18 [U-Boot-Users] [PATCH] wrong lcd splashscreen colors (pxa) Francesco Mandracci
2005-09-15 17:52 ` Wolfgang Denk
2005-09-16 10:41   ` Francesco Mandracci
2005-09-16 10:57     ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.