AnsweredAssumed Answered

Clarification of LCDIF Padding for iMX28

Question asked by markwilliams on Jan 30, 2018
Latest reply on Jan 30, 2018 by Victor Linnik

Hi,

 

We are using the Windows CE BSP with the iMX28 processor. We have a display wired up to the LCDIF with the bus width configured as 24-bit. It is an 18bpp display (RGB666) and we have the 6 MSb of each colour wired up.

 

The driver uses 16bpp source data (RGB565, bus width 16) so relies on the LCDIF to convert the data from 16 to 24 bits before exposing on the LCD IO pins.

 

I am trying to understand this but the RM is not that clear - it also has a mistake in the text:

 

3.2.2 Write Datapath

 

The LCD_DATABUS_WIDTH field in HW_LCDIF_CTRL register suggests the width
of the bus going to the external display controller. If the LCD_DATABUS_WIDTH is
not the same as WORD_LENGTH, LCDIF will do minor RGB to RGB color space
conversion. For example, if the input frame has more bits per pixel than the display, for
example, 16 bpp input frame going to 24 bpp LCD, LCDIF will pad the MSBs of each
color to the LSBs of the same color for each pixel. If the input frame has lesser bits per
pixel than the display, for example, 24 bpp input frame going to 16 bpp LCD, LCDIF
will drop the LSBs of each color to go to the lower resolution. LCDIF also has the
capability to support delta pixel displays by swizzling the R, G and B colors of each pixel
in the odd and even lines of the frame separately by programming the
ODD_LINE_PATTERN and the EVEN_LINE_PATTERN bitfields. This operation
occurs after the RGB-to-RGB color space conversion operation.

 

You can see the mistake (if input more than display, i.e. 16 in 24 out??). Anyway the line:

 

For example, if the input frame has more (less?!!) bits per pixel than the display, for
example, 16 bpp input frame going to 24 bpp LCD, LCDIF will pad the MSBs of each
color to the LSBs of the same color for each pixel

 

Is this saying that it will make the MSB the same as the two LSB? I.e.

 

xxABCDEF => EFABCDEF?

 

I would have thought that if 6 bits covers the entire colour range than a left shift two places would be the equivalent for 8 bits.

 

xxABCDEF => ABCDEF00

 

Please could someone clarify how the LCDIF converts 16bpp to 24bpp before sending out the IO pins?

 

Thank you in advance,

 

Mark

Outcomes