Dual channel LVDS on iMX8 Plus

Hi,

I am configuring the overlays for dual-channel LVDS on iMX8 Plus. The screen resolution is 1920x720 Here are the display requirements:

By setting hactive to 1920, I can see displays working but the color is distorted:

panel-timing {
clock-frequency = <148500000>;
de-active = <1>;
hactive = <1920>;
hback-porch = <300>;
hfront-porch = <0>;
hsync-len = <24>;
vactive = <720>;
vback-porch = <220>;
vfront-porch = <0>;
vsync-len = <23>;
};

The manufacturer recommends setting one channel to Odd pixel information, the other channel to Even pixel information. Something like:

panel-timing {
clock-frequency = <148500000>;
de-active = <1>;
hactive = <960>;
hback-porch = <0>;
hfront-porch = <300>;
hsync-len = <24>;
vactive = <720>;
vback-porch = <0>;
vfront-porch = <220>;
vsync-len = <23>;
};
However, with this setting, I got only a black screen.

Torizoncore used is 6.3

Please advise.

Hello,

I’m not from Toradex team but I had a similar issue.

Did you had the time to check this link

Best regards,

M

Greetings @ducnn,

While I don’t know what the exact issue is at the moment. If the only issue with the display output is the color, then it might be related to the data/color-mapping set in the device tree. Perhaps your display here uses a different color format than the one used by default in the device tree.

See this for more info (specifically the data-mapping property): https://www.kernel.org/doc/Documentation/devicetree/bindings/display/panel/panel-lvds.txt

Best Regards,
Jeremias

Hi unablesalt,

Yes I came over this page but it did not help much. Do you have a specific tip or area that I need to pay attention on ?

Hi jeremias,
Yes, I followed this page at the beginning.
The problem is with this setting

panel-timing {
clock-frequency = <148500000>;
de-active = <1>;
hactive = <1920>;
hback-porch = <300>;
hfront-porch = <0>;
hsync-len = <24>;
vactive = <720>;
vback-porch = <220>;
vfront-porch = <0>;
vsync-len = <23>;
};

I got the following screen.


If you zoom in, you can see there are 2 lines of pixels with different colours.

The manufacturer asked to move Odd pixel information to one channel and Even on another one. hence the new hactive value should be 1920/2. As consequence, I got only the black screen and no image displayed.

If you zoom in, you can see there are 2 lines of pixels with different colours.

Just to make sure I’m looking at the right things you mean these 2 small distortions here (circled in black):

If so, then this seems odd to me, if the issue was with configuration/timing then I would expect the distortion to be a continuous line across the entire screen. But here it looks like it’s just isolated to these 2 small portions of the display. It’s hard to say if it’s a timing issue or not.

Have you tried another display of the same model just as a sanity check to compare?

The manufacturer asked to move Odd pixel information to one channel and Even on another one. hence the new hactive value should be 1920/2. As consequence, I got only the black screen and no image displayed.

That sounds strange to me, but if the display went black with that configuration then obviously that’s not the right configuration for this display.

With regards to the timing values in your overlay, other than the resolution how did you determine the other values? Did you derive these from the datasheet or such?

Best Regards,
Jeremias

Hi jeremias,

If so, then this seems odd to me, if the issue was with configuration/timing then I would expect the distortion to be a continuous line across the entire screen. But here it looks like it’s just isolated to these 2 small portions of the display. It’s hard to say if it’s a timing issue or not.

No, it is continuous lines across entire screen.


and

Have you tried another display of the same model just as a sanity check to compare?

Yes, I tested on another screen but the same issue.

That sounds strange to me, but if the display went black with that configuration then obviously that’s not the right configuration for this display.

Yes, I would agree as per my observation

With regards to the timing values in your overlay, other than the resolution how did you determine the other values? Did you derive these from the datasheet or such?
We followed this link

and

  • clock-frequency is the pixel clock in Hz. On the table, this is the Clock Rate so the value is 83500000.* hactive is the horizontal display resolution in pixels. On the table, this is the Horizontal period (High) THd (1280).* vactive is the vertical display resolution in pixels. On the table, this is the Vertical period (High) TVd (800).* hfront-porch is the horizontal front porch, the number of clock pulses (pixels) between the last valid pixel data in the line and the next HSYNC pulse. The datasheet does not provide this number but it provides the complete Horizontal period (TH) and the Horizontal period (High) (THd) so you can calculate the horizontal front porch as TH - THd = 1680 - 1280 = 4001.* hback-porch is the horizontal back porch, the number of pulses (pixels) between the HSYNC signal and the first valid pixel data. According to the datasheet timings diagram, this value is zero.* hsync-len is the number of clock pulses (pixels) during which the HSYNC signal is active. There is no entry on the datasheet so you can assume zero1.* vback-porch is the vertical back porch, the number of lines (HSYNC pulses) from a VSYNC signal to the first valid line. According to the datasheet timings diagram, this value is zero.* vfront-porch is the vertical front porch, the number of lines (HSYNC pulses) between the last valid line of the frame and the next VSYNC pulse. The datasheet does not provide this number but it provides the complete Vertical period (TV) and the Vertical period (High) (TVd) so you can calculate the vertical front porch as TV - TVd = 831 - 800 = 311.* vsync-len is the number of HSYNC pulses during which a VSYNC signal is active. There is no entry on the datasheet so you can assume zero1.

Yes these calculated parameters derive from the datasheet.

Best regards,
D

Hi jeremias

If so, then this seems odd to me, if the issue was with configuration/timing then I would expect the distortion to be a continuous line across the entire screen. But here it looks like it’s just isolated to these 2 small portions of the display. It’s hard to say if it’s a timing issue or not.

No, it is not these 2 portions. This pattern that I used is: Philips circle pattern - Wikipedia
If you zoom the photo, we can see continuous lines as you mentioned


and

Have you tried another display of the same model just as a sanity check to compare?

Yes, I tried another display and it was the same issue.

That sounds strange to me, but if the display went black with that configuration then obviously that’s not the right configuration for this display.

Yes, I would agree based on my observation.

With regards to the timing values in your overlay, other than the resolution how did you determine the other values? Did you derive these from the datasheet or such?

We followed this link
and this

  • clock-frequency is the pixel clock in Hz. On the table, this is the Clock Rate so the value is 83500000.* hactive is the horizontal display resolution in pixels. On the table, this is the Horizontal period (High) THd (1280).* vactive is the vertical display resolution in pixels. On the table, this is the Vertical period (High) TVd (800).* hfront-porch is the horizontal front porch, the number of clock pulses (pixels) between the last valid pixel data in the line and the next HSYNC pulse. The datasheet does not provide this number but it provides the complete Horizontal period (TH) and the Horizontal period (High) (THd) so you can calculate the horizontal front porch as TH - THd = 1680 - 1280 = 4001.* hback-porch is the horizontal back porch, the number of pulses (pixels) between the HSYNC signal and the first valid pixel data. According to the datasheet timings diagram, this value is zero.* hsync-len is the number of clock pulses (pixels) during which the HSYNC signal is active. There is no entry on the datasheet so you can assume zero1.* vback-porch is the vertical back porch, the number of lines (HSYNC pulses) from a VSYNC signal to the first valid line. According to the datasheet timings diagram, this value is zero.* vfront-porch is the vertical front porch, the number of lines (HSYNC pulses) between the last valid line of the frame and the next VSYNC pulse. The datasheet does not provide this number but it provides the complete Vertical period (TV) and the Vertical period (High) (TVd) so you can calculate the vertical front porch as TV - TVd = 831 - 800 = 311.* vsync-len is the number of HSYNC pulses during which a VSYNC signal is active. There is no entry on the datasheet so you can assume zero1.

Yes, we derive these parameters from the datasheet.

Best regards,
D

I can sort of see the distortions now, though it’s rather subtle. I wasn’t sure if this was the display output or artifacts from taking a picture of a screen. Okay then, this would lead me to think the timing values you’ve derived aren’t completely correct for this display then.

That said, I’m not sure I follow your logic in how you derived these values. For hfront-porch you said:

hfront-porch is the horizontal front porch, the number of clock pulses (pixels) between the last valid pixel data in the line and the next HSYNC pulse. The datasheet does not provide this number but it provides the complete Horizontal period (TH) and the Horizontal period (High) (THd) so you can calculate the horizontal front porch as TH - THd = 1680 - 1280 = 4001.

Yet I don’t see this value for front-porch anywhere in the device tree overlays you’ve shared so far. Perhaps I’m misunderstanding something.

By the way since you said this LVDS display is dual channel, what do the rest of your device tree changes/overlays look like?

The manufacturer asked to move Odd pixel information to one channel and Even on another one. hence the new hactive value should be 1920/2. As consequence, I got only the black screen and no image displayed.

When your manufacturer suggested this I was a little confused how this translates to divide h-active by 2. For reference we have some pre-made overlays on using dual channel LVDS. One such overlay looks like this: display-lp156wf1_sn65dsi84_overlay.dtsi « overlays - device-tree-overlays.git - Sources for Device Tree Overlays

You can see we divide odd and even pixels into separate LVDS output channels. Maybe this is what your manufacturer meant?

Best Regards,
Jeremias