[U-Boot-Users] [PATCH v2] Fix bitmap display for atmel lcd controller

2008-08-01 Thread Mark Jackson
The current lcd_display_bitmap() function does not work properly
for the Atmel LCD controller.

2 fixes need to be done:-

(a) when setting the colour map, use the lcd_setcolreg() function
as provided by the Atmel driver
(b) the data is never actually written to the lcd framebuffer !!

Below is a patch to fix these issues.

Signed-off-by: Mark Jackson [EMAIL PROTECTED]
---

diff --git a/common/lcd.c b/common/lcd.c
index eec1f53..e03cff3 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -678,6 +678,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
/* Set color map */
for (i=0; icolors; ++i) {
bmp_color_table_entry_t cte = bmp-color_table[i];
+#if !defined(CONFIG_ATMEL_LCD)
ushort colreg =
( ((cte.red)8)  0xf800) |
( ((cte.green)  3)  0x07e0) |
@@ -692,6 +693,9 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 #elif defined(CONFIG_MPC823)
cmap--;
 #endif
+#else /* CONFIG_ATMEL_LCD */
+   lcd_setcolreg(i, cte.red, cte.green, cte.blue);
+#endif
}
}
 #endif
@@ -727,7 +731,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
for (i = 0; i  height; ++i) {
WATCHDOG_RESET();
for (j = 0; j  width ; j++)
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_ATMEL_LCD)
*(fb++) = *(bmap++);
 #elif defined(CONFIG_MPC823) || defined(CONFIG_MCC200)
*(fb++)=255-*(bmap++);

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH v2] Fix bitmap display for atmel lcd controller

2008-08-01 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:
 The current lcd_display_bitmap() function does not work properly
 for the Atmel LCD controller.
 
 2 fixes need to be done:-
 
 (a) when setting the colour map, use the lcd_setcolreg() function
 as provided by the Atmel driver
 (b) the data is never actually written to the lcd framebuffer !!
 
 Below is a patch to fix these issues.
 
 Signed-off-by: Mark Jackson [EMAIL PROTECTED]
 ---
 
 diff --git a/common/lcd.c b/common/lcd.c
 index eec1f53..e03cff3 100644
 --- a/common/lcd.c
 +++ b/common/lcd.c

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Be kind to unkind people - they need it the most.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users