public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mark Jackson <mpfj@mimc.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Fix bitmap display for atmel lcd controller
Date: Wed, 30 Jul 2008 16:09:58 +0100	[thread overview]
Message-ID: <48908446.8020801@mimc.co.uk> (raw)

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 actual data is never actually written to the lcd framebuffer !!

Below is a patch to fix these issues.

---

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; i<colors; ++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++);

             reply	other threads:[~2008-07-30 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 15:09 Mark Jackson [this message]
2008-07-31 15:43 ` [U-Boot-Users] [PATCH] Fix bitmap display for atmel lcd controller Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48908446.8020801@mimc.co.uk \
    --to=mpfj@mimc.co.uk \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox