Hello,
I'm running Freescale's BSP for Linux kernel v3.14 (branch imx_3.14.28_1.0.0_ga) and wanted to have two LVDS channels in separate mode:
IPU1:DI0 --> LVDS0
IPU1:DI1 --> LVDS1
I have my LVDS display working if I only enable one channel, either LVDS0 or LVDS1.
I also have dual display working if I enable both channels and use the property dual-mode, thus having cloned image on LVDS0 and LVDS1.
However, if I enable both LVDS channels in separate mode (without either property dual-mode or split-mode the kernel hangs.
My device tree (omitting some data) looks like:
&ldb {
lvds-channel@0 {
crtc = "ipu1-di0";
status = "okay";
primary;
};
lvds-channel@1 {
crtc = "ipu1-di1";
status = "okay";
};
};
The kernel hangs around the fb_set_var() call in this piece of code in the function mxcfb_register() of mxc_ipuv3_fb.c driver:
if (!mxcfbi->late_init) {
fbi->var.activate |= FB_ACTIVATE_FORCE;
console_lock();
fbi->flags |= FBINFO_MISC_USEREVENT;
ret = fb_set_var(fbi, &fbi->var);
fbi->flags &= ~FBINFO_MISC_USEREVENT;
console_unlock();
if (ret < 0) {
dev_err(fbi->device, "Error fb_set_var ret:%d\n", ret);
goto err3;
}
...
Has anybody tested LVDS0 and LVDS1 in separate mode?
Solved! Go to Solution.
Hi Héctor,
Below is what I was answered back from the experts:
The default 3.14.28 GA BSP can support separate mode directly, you just need set the video mode in kernel command line as followed:
video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb1:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb2:off video=mxcfb3:off
For iMX6Q SabreSD, arch/arm/boot/dts/imx6q-sabresd.dts, the default is:
&ldb {
lvds-channel@0 {
crtc = "ipu2-di0";
};
lvds-channel@1 {
crtc = "ipu2-di1";
};
};
You can change them to followed for IPU1:
&ldb {
lvds-channel@0 {
crtc = "ipu1-di0";
};
lvds-channel@1 {
crtc = "ipu1-di1";
};
};
After booted, you can use "echo 0 > /sys/class/graphics/fb2/blank" to enable the second LVDS display, then you can use the memtool to check the setting from registers:
/unit_tests/memtool -32 0x020e0008 1 (LDB_CTRL)
/unit_tests/memtool -32 0x020e000c 1 (IOMUXC_GPR3, LVDSx_MUX_CTL)
/Alejandro
Hi,
Which modifications did you perform to configure both LVDS in separate mode?
Best Regards,
Alejnadro
Hi,
I didn't do any modification than what the Device Tree I posted. By not having either the 'dual-mode' or 'spli-mode' boolean properties and having the 'crtc' property on each LVDS channel to a different DI, I expect the driver is able to route a different framebuffer to each LVDS channel.
Here are my framebuffers linked to ldb display:
mxcfb2: fb@1 { | |
compatible = "fsl,mxc_sdc_fb"; | |
disp_dev = "ldb"; | |
interface_pix_fmt = "RGB666"; | |
default_bpp = <16>; | |
int_clk = <0>; | |
late_init = <0>; | |
status = "okay"; |
};
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 = "okay"; |
};
Has Freescale tested separate dual display with LDB?
Thank you.
Hi Héctor,
Below is what I was answered back from the experts:
The default 3.14.28 GA BSP can support separate mode directly, you just need set the video mode in kernel command line as followed:
video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb1:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb2:off video=mxcfb3:off
For iMX6Q SabreSD, arch/arm/boot/dts/imx6q-sabresd.dts, the default is:
&ldb {
lvds-channel@0 {
crtc = "ipu2-di0";
};
lvds-channel@1 {
crtc = "ipu2-di1";
};
};
You can change them to followed for IPU1:
&ldb {
lvds-channel@0 {
crtc = "ipu1-di0";
};
lvds-channel@1 {
crtc = "ipu1-di1";
};
};
After booted, you can use "echo 0 > /sys/class/graphics/fb2/blank" to enable the second LVDS display, then you can use the memtool to check the setting from registers:
/unit_tests/memtool -32 0x020e0008 1 (LDB_CTRL)
/unit_tests/memtool -32 0x020e000c 1 (IOMUXC_GPR3, LVDSx_MUX_CTL)
/Alejandro
Hi Alejandro,
The kernel hang was due to a wrong patch I had on ldb.c driver. After fixing it, separate mode worked fine. Thanks.