Nicolas Moniez

LCD Color Shift on IMX51 EVK (under UBOOT)

Discussion created by Nicolas Moniez on Oct 25, 2011
Latest reply on Oct 27, 2011 by Nicolas Moniez

Hi everybody,


I’m currently working on IMX51 Evaluation board with a LCD 3.5”, 240x320, from Hitachi (TX09D70VM1CCA).

I have downloaded and installed the last version of UBOOT (2009-08-imx_11.09.01) which support splash screen, and I tried to display a bmp image under uboot, using command: "bmp display [address]".


So I added in mx51_bbg.h, the following definition:


#define CONFIG_LCD_SPLASH_SCREEN                     (to allow splash screen at start up)


I changed some definitions to be adapted to my LCD Panel:

#define LCD_BPP  LCD_COLOR16                               

#define CONFIG_BMP_16BPP                                      (the input bmp file will be in 65536 colors)


My RGB image is in RGB565 bmp format (created with gimp).


In mx51_bbg.c, in ipuv3_fb_init function, the pixel format is configured to IPU_PIX_FMT_RGB666 (because LCD data bus is working in RGB666 => verified in correpsonding data sheet).


When I try to display an image, using the command “bmp display [address]” under uboot, I have an error : the global shape of the image is respected, the size also, but colors are not correct compared to the original file.

It seems that colors have been shifted.


To understand what is the problem I created 3 files with gimp in RGB565 format:

  • Red.bmp:     R=255, G=0,    B=0
  • Green.bmp:  R=0,    G=255, B=0
  • Blue.bmp:    R=0,    G=0,     B=255

I displayed each picture. For each file, the color is correct on the LCD panel, and data which are copied inside frame buffer are correct (I used a printf in lcd.c file to check what are the data sent to frame buffer using fb pointer).


Maybe I missed a specific register to configure or a definition to add, but I didn’t found any topics about this problem on different forums I visited.


Any ideas to solve this color shift problem ?