Linux framebuffer: Is it 18bit possible?

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

Linux framebuffer: Is it 18bit possible?

3,588 Views
ManuMartinez
Contributor I

Hello,

Does anyone know if the Linux BSP of iMX28VK support a framebuffer of 18bit? I've tried to change the original driver an recompile but my TFT doesn't show anything (is a 7"@800x480@18bpp). With the original driver I can see images but obviously wrong painted: so the LCD is working right.

Thank you.

Labels (1)
0 Kudos
9 Replies

1,638 Views
ManuMartinez
Contributor I

I was wrong again: my LCD works even below 30Mhz (at 24Mhz). I designed a new board to convert RGB888 to RGB666 and now the LCD is working fine.

The only "con" I've found is that 5V taken from the Freescale's LCD board (Hitachi's 4.7") is not able to supply enough current for my 7" display (about 160mA@9.8V).

Regards!

0 Kudos

1,638 Views
ManuMartinez
Contributor I

Well, my experience with my new 24bit TFT has been incredibly short: I broke the flexible cable before to test the panel! Sometimes I'm a disaster :-(.

I came back to the tests with the 18bit screen. This time I've tried to connect the TFT via the FPC connector of the 4.3 TFT instead  of using the SAMTEC's 120 pin connector (wich is very hard to soldering by hand).

Now I can see the Linux penguin with the right colors. However the QT applications print the image fuzzy.

I've tested the CLK frequency with the oscilloscope and I've measured 24Mhz (out of the range of my LCD: min 29.5Mhz) what doesn't make sense since the cycle defined in "lcdif.h" is 30ns (33Mhz).

So I'm almost sure that my LCD doesn't work because a wrong CLK frequency but I don't know why the frequency is 24Mhz instead of 33Mhz.

Any advice?


0 Kudos

1,638 Views
ManuMartinez
Contributor I

Hi again Denny,

my colleague says that what you done is just what they tried but with the resolution at 800x480. We are failing in other thing.

I've purchased a 7"@24bit TFT in Mouser. Next week I will continue doing tests.

Very grateful by your help!

Regards.

Manu.

0 Kudos

1,638 Views
DennyvanLeersum
Contributor II

Hi Manu

in lcdif.h the only thing i changed was this line:

__raw_writel(BF_LCDIF_CTRL_WORD_LENGTH(3) | /* 24 bit */
BM_LCDIF_CTRL_DATA_SELECT | /* data mode */
BF_LCDIF_CTRL_INPUT_DATA_SWIZZLE(0) | /* no swap */
BF_LCDIF_CTRL_LCD_DATABUS_WIDTH(2), /* 18 bit */
REGS_LCDIF_BASE + HW_LCDIF_CTRL_SET);

Where I set the DATABUS_WIDTH to 2.

The struct you refer to I think is in the LCD driver.

I derived it from one of the supplied LCD drivers (in /drivers/video/mxs).

Note that our LCD has a different resolution, so you should keep the values of the original drivers. To use a different resolution some defines in the top of the file had to be changed as well.

static struct mxs_platform_fb_entry fb_entry = {
.name = "43wvf1g",
.x_res = 480,
.y_res = 640,
.bpp = 32,
.cycle_time_ns = 30,
.lcd_type = MXS_LCD_PANEL_DOTCLK,
.init_panel = init_panel,
.release_panel = release_panel,
.blank_panel = blank_panel,
.run_panel = mxs_lcdif_run,
.stop_panel = mxs_lcdif_stop,
.pan_display = mxs_lcdif_pan_display,
.bl_data = &bl_data,
};

Regards,

Denny

0 Kudos

1,638 Views
ManuMartinez
Contributor I
Hi, I think Jorge (my colleague) has already tried it: but not 100% sure. Tomorrow I will ask him. Could you post your struct (in lcdif.h)?. Thanks. It might be the 120pin connector of my board is wrong soldered but I doubt it since with the 24bit config we can see wrong colors but with the 18bit config we see can the screen completely painted in white with little circles also in white but brighter.. Regards, Manu.
0 Kudos

1,638 Views
DennyvanLeersum
Contributor II

Hi,

We use the 2.6.35 kernel provided by freescale. We have not tested with other kernels yet. I checked our display driver again and the .bpp value is at 32 bits and not 24, I cannot remember if we tested with 24, but can you try this?

Regards,

Denny

0 Kudos

1,638 Views
ManuMartinez
Contributor I

Hi,

Denny:

What kernel are you using?. My colleague, who is in charge of the Linux stuff, has just told me that he has tried what you say with the BSP downloaded in the web of Freescale (kernel 2.6.35) and it still not working. On the other hand he has downloaded the lastest official kernel (2.6.39) and it seems that, even he has problems to initializate the kernel, the LCD shows the right colors.

Regards.

0 Kudos

1,638 Views
DennyvanLeersum
Contributor II

Hi,

in

arch/arm/mach-mx28/include/mach/lcdif.h

LCD_DATABUS_WIDTH is hardcoded to '3' which is for a 24 bit LCD. If you change this value to '2' the LCDIF will be set for an 18 bit LCD (See chapter 33 of the imx28 reference manual). Your frame buffer color depth setting in your TFT driver should still be set for 24 bit, the LCDIF does the conversion internally I think. I do not think the framebuffer implementation for the MXS platform is ready yet for 18 bit framebuffers, but I could be wrong. 

As Richard stated we have it working and this is all we had to do.

Regards,

Denny

0 Kudos

1,638 Views
rpjknoop
Contributor II

Hello, we have a 18 bit LCD up and running on the i.mx28EVK. Details are known to my colleague. He will be in the office tomorrow. I will ask him to reply tomorrow.

Regards.

0 Kudos