Clarification of LCDIF Padding for iMX28

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clarification of LCDIF Padding for iMX28

424 Views
markwilliams
Senior Contributor I

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

Labels (2)
0 Kudos
1 Reply

294 Views
b36401
NXP Employee
NXP Employee

Yes. It seems to be misprint here regarding to more/less bits.
As for padding low (absentee) bits with high ones it is done for smooth convertion colors from all 0's to all 1's input values into the output with more bits.
I mean in case of setting low bits to 0 we are not getting all dynamic range of the picture.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos