1. Hi,
2. We are using the TI Sitara AM37X Evaluation Module (EVM) Sitara from Mistral for developing a handheld device.The LCD in the kit has been replaced by a 24bit 4.3 inch NEC LCD(NL4827HC19-05B). The driver modifications are as follows:
1.The timing parameters were changed in the file lcd_vga.c
{ /*NEC_LCD_480H_272W */
DISPC_PIXELFORMAT_RGB16, //pixelFmt;
480, //width;
272, //height;
40, //hsw;
1, //hfp;
1, //hbp;
1, //vsw;
0, //vfp;
0, //vbp;
1, //logClkDiv;
9, //pixelClkDiv;
(11 << 0), //dss1ClkSel;
0, //loadMode;
(DISPC_POL_FREQ_IVS | DISPC_POL_FREQ_IHS | DISPC_POL_FREQ_ONOFF),//polFreq;
0x00000000, //lcdDefaultColor;
0x00000000, //lcdTransColor;
0x00000000, //tvDefaultColor;
0x00000000, //tvTransColor;
},
2. changed the output format from 18 to 24 bit
OUTREG32( &g_pDispRegs->DISPC_CONTROL,
DISPC_CONTROL_GPOUT1 |
DISPC_CONTROL_GPOUT0 |
DISPC_CONTROL_TFTDATALINES_24 |
// DISPC_CONTROL_TFTDATALINES_18 |
DISPC_CONTROL_STNTFT
);
3.changed the bitmask in file omap_ddge.cpp
case OMAP_DSS_PIXELFORMAT_RGB16:
*pAlphaBitMask = 0xff000000;
*pRBitMask = 0x00ff0000;
*pGBitMask = 0x0000ff00;
*pBBitMask = 0x000000ff;
bResult = TRUE;
break;
However after booting WinCE the display shows flicker. Any help or pointers to solve the issue is highly appreciated.
Thanks,
Jithendran
http://www.nestgroup.net/
3. The data sheet of the LCD available in the following link. minidevs.googlecode.com/files/NEC-NL4827HC19.pdf
Hi Atul,
Thanks a lot for a quick reply. I am trying to understand a little bit about the display driver so that I can debug the issue. One thing I don't understand is how it worked for Jithendran when he used RGB16 and the maskings
I appreciate your insights on this.
Besides using RGB32 instead of RGB16, would you please tell me what else I need to change to work with 24-bit LCD? Should I set bits per pixel to 24 or 32? The driver sets it to 32.
Luan
Use pixel format 16 or 32. Pixel format and LCD lines are different concepts - former controls how pixels are organized in framebuffer (more bpp will require more data movement and slower performance). Just because you have 24 bit LCD does not mean you have to use 24 bpp in representing data (really depends upon color range you want). See file lcd_vga.c - for DVI mode it sets up the controller in 24 bit mode but still uses 16 bpp pixel format. Here is what I would recommend:
1. Leave pixel format as 16 bpp
2. Verify timing parameters for your panel and modify code accordingly
3. Just like DVI, setup controller for 24 bit lines
Once you have this configuration working, then you can move to the next step of messing around with pixel format (if desired)
Atul
Thanks Atul. I understand the concepts better now. Just to confirm with you - if I use pixel format as 16 bpp and 24 bit lines, I should be able to use the existing maskings as
case OMAP_DSS_PIXELFORMAT_RGB16: *pAlphaBitMask = 0x0000;*pRBitMask = 0xf800;*pGBitMask = 0x07e0;*pBBitMask = 0x001f;bResult = TRUE;break; Thanks, Luan
case
OMAP_DSS_PIXELFORMAT_RGB16:
*pAlphaBitMask = 0x0000;*pRBitMask = 0xf800;*pGBitMask = 0x07e0;*pBBitMask = 0x001f;bResult = TRUE;break;
yes - this is 5:6:5 format.
Also refer to GFXREPLICATIONENABLE bit in DISPC_GFX_ATTRIBUTES register - if you set it to 1, controller will replicate MSB color bits into lower color lines otherwise they will remain 0 (since you have RGB16). Either way it should be fine but play around with it - if In understand this correctly, setting bit to 1 should give more intense color
One more question - when I am using RGB16 with 24-bit lines, would you please tell me which data lines contain the RGB colors if I have GFXREPLICATIONENABLE set to 0?
Luan,
DSS data lines are left aligned. This means the the upper bits(MSB part ) should be used. When GFXREPLICATIONENABLE is set to 0, the LSB part is filled up with 0s.
RED: DSS_16(LSB) - DSS_23(MSB)
GREEN: DSS_8(LSB) - DSS_15(MSB)
BLUE: DSS_0(LSB) - DSS_7(MSB)
Tao