John Reep

3.10.31-1.1.0-beta2 LVDS mode settings

Discussion created by John Reep on Jan 30, 2015

I currently use the i.MX6 with several different displays.  I have been working to incorporate a way to not have the Linux Kernel come up and default to 1024x768.


I am certain there may be a better way than I have gone through.  However, I have created a patch for the <kernel>/drivers/video/mxc/ldb.c file in the 3.10.31-1.1.0-beta2 branch of the Freescale linux-2.6 kernel.  I don't know what the *right* mechanism is to submit this patch up to Freescale directly for the git repository so I decided to start here.  I believe this patch would also be appropriate for the 3.10.53 ga kernel that is up on the Freescale git repository but I have not yet moved to that kernel.


This patch adds in the support for the ldb_init routine to parse and utilize the device tree node "display-timings" that can be declared under the ldb device node.  A declaration of a value is similar to:


display-timings {

            native-mode = <&timing0>;

            timing0: hsd100pxn1 {

                clock-frequency = <65000000>;

                hactive = <1024>;

                vactive = <768>;

                hback-porch = <220>;

                hfront-porch = <40>;

                vback-porch = <21>;

                vfront-porch = <7>;

                hsync-len = <60>;

                vsync-len = <10>;



This display-timings is an example taken from one of the Freescale provided dtsi files.  I have extended for my panel use case.  I realized that on all of the forums people usually say to setup the mxcfb0:dev=ldb,<mode>,if=<your if> where the <mode> is something like LDB-XGA.  Well, it appears that this does not work (or at least I have not gotten it to work).  The LDB-XGA field is no longer part of ldb.c.  I referenced back to 3.10.17 and the struct ldb_modedb existed in 3.10.17 but does not exist in 3.10.31.  Furthermore, the ldb_init routine attempts to use the framebuffered pre-setup parameters which then does not allow for other modes to "natively be allowed".  I also discovered that display-timings does nothing for the ldb/LVDS functionality and thus set out to correct this problem. 


If you test this patch to add your device timings, then other timings can be added similar to the example shown above.  The native-mode field should be set to the native mode that you desire so that way the LVDS comes up properly.

Original Attachment has been moved to: