i.MX6Q Dual channel LVDS output in kernel 3.10.53 / 3.14.52

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

i.MX6Q Dual channel LVDS output in kernel 3.10.53 / 3.14.52

Jump to solution
3,264 Views
marcchapdelaine
Contributor II

I have a custom board with two 1920x1080 60Hz screens, one is using the parallel display and the other one is using the two LVDS channels outputs.

The board is working fine with the 3.10.17 kernel version. In the 3.10.53 and 3.14.52, I recreated the device tree (one for each kernel version). The parallel display is working properly. But the LVDS screen is working only at 1920x1080 25Hz.

In the "ldb" section of the device tree, I added the "split-mode" to use both LVDS outputs for a single display as documented inside the "Documentation/devicetree/bindings/video/fsl,ldb.txt" file. In the kernel logs, I have a line " ldb ldb.14: LVDS channel1 is not online" but if I define it I got a message telling me that lvds_channel1 is ignored in split-mode.

I'm providing traces and device tree sections for the LVDS video output:

Kernel version, kernel command line, output video mode and kernel trace

# uname -a

Linux NeoTrans 3.14.52-135322-g5f6f0a5-dirty #3 SMP PREEMPT Mon May 2 15:37:10 EDT 2016 armv7l GNU/Linux

# cat /proc/cmdline

console=ttymxc3,115200 mtdparts=gpmi-nand:15m(kernel_a),1m(dtb_a),15m(kernel_b),1m(dtb_b),128k(startup_a),128k(startup_b),16m(ramdisk),-(free);spi32765.0:768k(uboot),64k(ubenv_a),64k(ubenv_b),-(free) rdinit=/linuxrc rootfstype=ext4 rw rootwait root=/dev/mmcblk2p3 video=mxcfb2:dev=ldb,1920x1080M@60,if=RGB24,bpp=24 video=mxcfb0:dev=lcd,1920x1080M@60,if=RGB24,bpp=24 ldb=spl0 consoleblank=0 fbmem=48M

# cat /sys/class/graphics/fb2/fsl_disp_dev_property

ldb

# cat /sys/class/graphics/fb2/mode

# cat /sys/class/graphics/fb2/modes

U:1920x1080p-25

#

# dmesg | grep ldb

Kernel command line: console=ttymxc3,115200 mtdparts=gpmi-nand:15m(kernel_a),1m(dtb_a),15m(kernel_b),1m(dtb_b),128k(startup_a),128k(startup_b),16m(ramdisk),-(free);spi32765.0:768k(uboot),64k(ubenv_a),64k(ubenv_b),-(free) rdinit=/linuxrc rootfstype=ext4 rw rootwait root=/dev/mmcblk2p3 video=mxcfb2:dev=ldb,1920x1080M@60,if=RGB24,bpp=24 video=mxcfb0:dev=lcd,1920x1080M@60,if=RGB24,bpp=24 ldb=spl0 consoleblank=0 fbmem=48M

ldb ldb.14: split mode

ldb ldb.14: split mode or dual mode, ignoring second output

mxc_sdc_fb fb.19: registered mxc display driver ldb

ldb ldb.14: LVDS channel1 is not online

Device tree sections for kernel 3.14.52

/ {

        aliases {

                mxcfb0 = &mxcfb1;

                mxcfb1 = &mxcfb2;

                mxcfb2 = &mxcfb3;

                mxcfb3 = &mxcfb4;

        };

        mxcfb1: fb@0 {

                compatible = "fsl,mxc_sdc_fb";

                disp_dev = "ldb";

                interface_pix_fmt = "RGB666";

                default_bpp = <16>;

                int_clk = <0>;

                late_init = <0>;

                status = "disabled";

        };

        mxcfb2: fb@1 {

                compatible = "fsl,mxc_sdc_fb";

                disp_dev = "hdmi";

                interface_pix_fmt = "RGB24";

                mode_str ="1920x1080M@60";

                default_bpp = <24>;

                int_clk = <0>;

                late_init = <0>;

                status = "disabled";

        };

        mxcfb3: fb@2 {

                compatible = "fsl,mxc_sdc_fb";

                disp_dev = "lcd";

                interface_pix_fmt = "RGB565";

                mode_str ="CLAA-WVGA";

                default_bpp = <16>;

                int_clk = <0>;

                late_init = <0>;

                status = "disabled";

        };

        mxcfb4: fb@3 {

                compatible = "fsl,mxc_sdc_fb";

                disp_dev = "ldb";

                interface_pix_fmt = "RGB666";

                default_bpp = <16>;

                int_clk = <0>;

                late_init = <0>;

                status = "disabled";

        };

        lcd@0 {

                compatible = "fsl,lcd";

                ipu_id = <0>;

                disp_id = <0>;

                default_ifmt = "RGB24";

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_ipu1_1>;

                status = "okay";

        };

};

&ldb {

        status = "okay";

        split-mode;

        lvds-channel@0 {

                fsl,data-mapping = "spwg";

                fsl,data-width = <24>;

                primary;

                status = "okay";

                display-timings {

                        native-mode = <&timing0>;

                        timing0: hsd100pxn1 {

                                clock-frequency = <65000000>;

                                hactive = <1920>;

                                vactive = <1080>;

                                hback-porch = <220>;

                                hfront-porch = <40>;

                                vback-porch = <21>;

                                vfront-porch = <7>;

                                hsync-len = <60>;

                                vsync-len = <10>;

                        };

                };

        };

};

1 Solution
1,171 Views
marcchapdelaine
Contributor II

Ok, I found the issue. It was the screen LVDS clock that was not correct. The screen i'm using has a 74.25Mhz LVDS clock, so changing the device tree to 148.5Mhz instead of 60Mhz fix the issue. I now have a 60Hz screen.

For reference, my ldb section of the device tree looks like this:

====

&ldb {

        status = "okay";

        split-mode;

        lvds-channel@0 {

                fsl,data-mapping = "spwg";

                fsl,data-width = <24>;

                primary;

                status = "okay";

                display-timings {

                        native-mode = <&timing0>;

                        timing0: hsd100pxn1 {

                                clock-frequency = <148500000>;

                                hactive = <1920>;

                                vactive = <1080>;

                                hback-porch = <220>;

                                hfront-porch = <40>;

                                vback-porch = <21>;

                                vfront-porch = <7>;

                                hsync-len = <60>;

                                vsync-len = <10>;

                        };

                };

        };

};

====

I will need to fix the porch values to fit my screen properly, but I now have the two 1920x1080 outputs at 60Hz.

View solution in original post

6 Replies
1,172 Views
marcchapdelaine
Contributor II

Ok, I found the issue. It was the screen LVDS clock that was not correct. The screen i'm using has a 74.25Mhz LVDS clock, so changing the device tree to 148.5Mhz instead of 60Mhz fix the issue. I now have a 60Hz screen.

For reference, my ldb section of the device tree looks like this:

====

&ldb {

        status = "okay";

        split-mode;

        lvds-channel@0 {

                fsl,data-mapping = "spwg";

                fsl,data-width = <24>;

                primary;

                status = "okay";

                display-timings {

                        native-mode = <&timing0>;

                        timing0: hsd100pxn1 {

                                clock-frequency = <148500000>;

                                hactive = <1920>;

                                vactive = <1080>;

                                hback-porch = <220>;

                                hfront-porch = <40>;

                                vback-porch = <21>;

                                vfront-porch = <7>;

                                hsync-len = <60>;

                                vsync-len = <10>;

                        };

                };

        };

};

====

I will need to fix the porch values to fit my screen properly, but I now have the two 1920x1080 outputs at 60Hz.

1,171 Views
fulinux
Contributor IV

Hi Marc,

have you solved you problem? can you help me to solve this thread problem: U:1920x1080p-35

thanks,

fulinux.

0 Kudos
1,171 Views
marcchapdelaine
Contributor II

Hi Fulinux,

I didn't have an answer yet. But your thread gave me some hints. I tried to change the clock speed from 65Mhz to 83Mhz and I have a 33Hz refresh instead of 25Hz. I'll ask the hardware team for complete specs of the display.

I will keep you in touch.

===

# cd /sys/class/graphics/

# ls

fb0    fb1    fbcon

# cd fb0/

# ls

bits_per_pixel         cursor                 fsl_disp_dev_property  modes                  power                  stride                 virtual_size

blank                  dev                    fsl_disp_property      name                   rotate                 subsystem

console                device                 mode                   pan                    state                  uevent

# cat mode

U:1920x1080p-33

Device Tree:

    lvds-channel@0 {
            fsl,data-mapping = "spwg";
            fsl,data-width = <24>;
            primary;
            status = "okay";

            display-timings {
                    native-mode = <&timing0>;
                    timing0: hsd100pxn1 {
                            clock-frequency = <83000000>;
                            hactive = <1920>;
                            vactive = <1080>;
                            hback-porch = <220>;
                            hfront-porch = <40>;
                            vback-porch = <21>;
                            vfront-porch = <7>;
                            hsync-len = <60>;
                            vsync-len = <10>;
                    };
            };
    };
0 Kudos
1,171 Views
fulinux
Contributor IV

Hi Chapdelaine,

Ok, As you said, it is ok with my lcd panel refresh, look like this:

# cat /sys/class/graphics/fb0/modes

U:1920x1080p-71

thanks for you professional answer.

ps. when i remove 'crtc = "ipu2-di0";', i can't input on my serial terminal, but It doesn't matter. have you ported viv-gpu-bin lib? is it runs ok?

0 Kudos
1,171 Views
igorpadykov
NXP Employee
NXP Employee

Hi Marc

could you try to work only with one lvds display, as operation with

two 1920x1080 60Hz screens is at i.MX6Q IPU perfromance limit:

from p.2729 i.MX6DQ Reference Manual (rev.3  7/2015)

The combined rate for the two ports is up to 240 MP/sec

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,171 Views
marcchapdelaine
Contributor II

Hi Igor,

I tried with only the LVDS display (disabling the other screen on the LCD parallel port). I tried first on the command line (just removing the mxcfb1:LCD display, but it it still not working:

====

# dmesg | grep ldb

Kernel command line: console=ttymxc3,115200 mtdparts=gpmi-nand:15m(kernel_a),1m(dtb_a),15m(kernel_b),1m(dtb_b),128k(startup_a),128k(startup_b),16m(ramdisk),-(free);spi32765.0:768k(uboot),64k(ubenv_a),64k(ubenv_b),-(free) rdinit=/linuxrc rootfstype=ext4 rw rootwait root=/dev/mmcblk2p3 video=mxcfb0:dev=ldb,1920x1080M@60,if=RGB24,bpp=24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off ldb=spl0 consoleblank=0 fbmem=48M

ldb ldb.14: split mode

ldb ldb.14: split mode or dual mode, ignoring second output

mxc_sdc_fb fb.17: registered mxc display driver ldb

# cd /sys/class/graphics/fb0/

# cat mode

U:1920x1080p-25

# cat fsl_disp_dev_property

ldb

# cd ..

# ls -l

total 0

lrwxrwxrwx    1 root     root             0 May  5 13:07 fb0 -> ../../devices/soc0/fb.17/graphics/fb0

lrwxrwxrwx    1 root     root             0 May  5 13:07 fb1 -> ../../devices/soc0/fb.17/graphics/fb1

lrwxrwxrwx    1 root     root             0 May  5 13:07 fbcon -> ../../devices/virtual/graphics/fbcon

#

====

I tried also to comment the LCD output inside the device tree, but I have the same results.

====

/*

        lcd@0 {

                compatible = "fsl,lcd";

                ipu_id = <0>;

                disp_id = <0>;

                default_ifmt = "RGB24";

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_ipu1_1>;

                status = "okay";

        };

*/

====

0 Kudos