Commit 1464eff77e7fdaed609ecf263a2423c9dcf96b1f

Authored by Mark Jackson
Committed by Wolfgang Denk
1 parent 2a433c66b1

Fix bitmap display for atmel lcd controller

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 !!

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>

Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff

... ... @@ -678,6 +678,7 @@
678 678 /* Set color map */
679 679 for (i=0; i<colors; ++i) {
680 680 bmp_color_table_entry_t cte = bmp->color_table[i];
  681 +#if !defined(CONFIG_ATMEL_LCD)
681 682 ushort colreg =
682 683 ( ((cte.red) << 8) & 0xf800) |
683 684 ( ((cte.green) << 3) & 0x07e0) |
... ... @@ -692,6 +693,9 @@
692 693 #elif defined(CONFIG_MPC823)
693 694 cmap--;
694 695 #endif
  696 +#else /* CONFIG_ATMEL_LCD */
  697 + lcd_setcolreg(i, cte.red, cte.green, cte.blue);
  698 +#endif
695 699 }
696 700 }
697 701 #endif
... ... @@ -727,7 +731,7 @@
727 731 for (i = 0; i < height; ++i) {
728 732 WATCHDOG_RESET();
729 733 for (j = 0; j < width ; j++)
730   -#if defined(CONFIG_PXA250)
  734 +#if defined(CONFIG_PXA250) || defined(CONFIG_ATMEL_LCD)
731 735 *(fb++) = *(bmap++);
732 736 #elif defined(CONFIG_MPC823) || defined(CONFIG_MCC200)
733 737 *(fb++)=255-*(bmap++);