MIPI DSI Screen Misaligned

Started by PinkPR 6 years ago2 replieslatest reply 6 years ago678 views

Hi guys,

I'm currently trying to integrate a 4 Lanes MIPI DSI screen to an iMX6 custom board.

As the iMX6 doesn't provide any 4 lanes MIPI output, I am outputting via HDMI and converting the signal through a Toshiba TC358779XBG HDMI to MIPI converter.

My problem is that my screen is misaligned. The 300px left part of the image is displayed on the right of the screen. The whole image actually seems to be shifted to the left.

An other problem is that the colorspace seems shifted as well. I'm trying to output in RGB24, but the screens seems to interpret the data as BRG24.

The images displayed in the framebuffer are totally right, no pixel/colors is shifted.

Do you know where this misalignment + color problem could come from ?

I can't figure out whether it's coming from the HDMI output or the Toshiba's MIPI output.


[ - ]
Reply by BVRameshFebruary 6, 2018


I have not gone through the imx6's data sheet / user manual, however, working with LCD controllers implemented on NXP's 1788 / 4088 MCU, I feel that the problem is due to horizontal synchronization.

The shift is due to synchronization, you may have to program correct values for Horizontal Sync, Back porch and Front porch values. The displays will synchronize with respect to horizontal Sync, since the output is shifted left, you may have to increase the Horizontal Back porch value and decrease Horizontal Front porch value to the no of pixels shift.

Also for 24 bit color displays there will be option to switch RGB, (R:23-16, G:15-8, B:7-0) mode to BGR mode (B:23-16, G:15-8, R:7-0). Please see the data sheet carefully to implement this.

I have not gone through the data sheet of imx6 thoroughly, however, NXP's 1788 LCD controller has a register wherein in 24 bit color mode you can do the swapping by setting or clearing the bit 7 of LCD controller register 0x20088018. A similar setting should be available in the Graphics controller of imx6.

In order to determine whether it is due to imx6 or  Toshiba's MIPI, you can put the HDMI output to a display directly and confirm where the problem is.

All the best.

BV Ramesh.

[ - ]
Reply by PinkPRFebruary 6, 2018

Hi BV,

Thank you very much for the fast and complete answer. Actually, the screen is not displaying BGR instead of RGB, but BRG, wich is not a swap of RGB but actually a circular shift of RGB. It's like the reading cursor of the screen was shifted of 1 byte to the left. I can't tell if it's related to the misalignment or not.

The Horizontal Back Porch is 8 pixels, which is far lower than the shift I have. Then I can't decrease this porch by the length of the shift.

I'll try to play with horizontal porches and I'll get back in touch with you to share the results.