Hello community,
I interfaced the RGB display to iMX6 solo, its working fine. While interfacing I given the DISP0_DAT0-7(R),DISP0_DAT8-15(G) and DISP0_DAT16-23 to respective data lines on LCD connector(Its working fine).
But now my requirement is I want to connect with the below order
DISP0_DAT23 - DISP0_DAT16---------------------> B
DISP0_DAT15-DISP0_DAT8------------------------->G
DISP0_DAT7-DISP0_DAT0--------------------------->R.
I tried connecting as mentioned above also I changed the PIX_FMT to BGR24 but the colors are not coming properly.
What changes I need to do in BSP in order to reverse the bits as mentioned above so that display will work with proper colors?
Hello Shree97,
If I understand correctly you would like to switch from RGB to BGR, is that correct?
I haven’t tried this solution but changing MD_OFFSET_0 from 0x7 to 0x17 and MD_OFFSET_2 from 0x17 to 0x7 should convert RGB to BGR.
Would you please find the corresponding registers and give it a try?
//programming data mapping
//microcode pointer to mapping_pntr_0 = {Mapping_2, Mapping_1, Mapping_0};
ipu_build_fieldf(IPU_DC_MAP_CONF_0__MAPPING_PNTR_BYTE2_0, 2);//pointer to couple OFFSET_i & MASK_i
ipu_build_fieldf(IPU_DC_MAP_CONF_0__MAPPING_PNTR_BYTE1_0, 1);
ipu_build_fieldf(IPU_DC_MAP_CONF_0__MAPPING_PNTR_BYTE0_0, 0);
ip_rmwf_tb(0);
ipu_build_fieldf(IPU_DC_MAP_CONF_15__MD_OFFSET_0, 0x17);
ipu_build_fieldf(IPU_DC_MAP_CONF_15__MD_MASK_0, 0xFF);
ipu_build_fieldf(IPU_DC_MAP_CONF_15__MD_OFFSET_1, 0xF);
ipu_build_fieldf(IPU_DC_MAP_CONF_15__MD_MASK_1, 0xFF);
ip_rmwf_tb(0);
ipu_build_fieldf(IPU_DC_MAP_CONF_16__MD_OFFSET_2, 0x7);
ipu_build_fieldf(IPU_DC_MAP_CONF_16__MD_MASK_2, 0xFF);
ip_rmwf_tb(0);
Regards,
We are using linux source version 3.14.28 and in that I unable to find the above code snippet.
We want to reverse the bit order of R , G & B(MSB to LSB Or vice versa).
kindly share where I need to change in the BSP?
Best Regards,
Shrikant Raskar
Helo Shrikant Raskar,
My mistake. I thought you wanted to change the order of the color bytes. I'm afraid there is no way to change the endianness of the bits of each of the color as this is set in hardware.
My apologies for the inconvenience.
Regards,
Hello gusarambula,
Thanks for your guidance.
Best Regards,
Shrikant