Hello,
I've found many questions that looked similar but still could not find an answer for my problem.
I'm trying to set up 2 screens on imx6q. I want to be able to display different applications on each screen.
My current situation is as follows: the system bootsplash is displayed on both screens and there is only one fbdev device (/dev/fb0) which controls both screens.
I've read the second buffer must be activated with 'echo 0>/sys/class/graphics/fb2/blank' but there is no /sys/class/graphics/fb2 on my system.
Qt applications are displayed on one screen only. When I use QOpenGLContext::setScreen within a Qt test app to select LVDS0 or LVDS1, this has no effect and the application is always displayed on the same screen.
Here an extract from my device tree:
&ldb {
status = "okay";
lvds_channel0: lvds-channel@0 {
crtc = "ipu1-di0";
fsl,data-mapping = "spwg";
fsl,data-width = <24>;
status = "okay";
primary;
display-timings {
kyoceratcg121wxlpx {
clock-frequency = <71100000>;
hactive = <1280>;
vactive = <800>;
hback-porch = <48>;
hfront-porch = <80>;
vback-porch = <15>;
vfront-porch = <2>;
hsync-len = <32>;
vsync-len = <6>;
hsync-active = <0>;
vsync-active = <0>;
};
};
};
lvds_channel1: lvds-channel@1 {
crtc = "ipu2-di1";
fsl,data-mapping = "spwg";
fsl,data-width = <24>;
status = "okay";
display-timings {
kyoceratcg121wxlpx {
clock-frequency = <71100000>;
hactive = <1280>;
vactive = <800>;
hback-porch = <48>;
hfront-porch = <80>;
vback-porch = <15>;
vfront-porch = <2>;
hsync-len = <32>;
vsync-len = <6>;
hsync-active = <0>;
vsync-active = <0>;
};
};
};
};
And an extract from the system logs:
[ 0.285717] etnaviv gpu-subsystem: bound 134000.gpu (ops 0x80857108)
[ 0.285809] etnaviv gpu-subsystem: bound 130000.gpu (ops 0x80857108)
[ 0.285894] etnaviv gpu-subsystem: bound 2204000.gpu (ops 0x80857108)
[ 0.285908] etnaviv-gpu 134000.gpu: model: GC320, revision: 5007
[ 0.317132] etnaviv-gpu 130000.gpu: model: GC2000, revision: 5108
[ 0.347739] etnaviv-gpu 2204000.gpu: model: GC355, revision: 1215
[ 0.347754] etnaviv-gpu 2204000.gpu: Ignoring GPU with VG and FE2.0
[ 0.348247] [drm] Initialized etnaviv 1.1.0 20151214 for gpu-subsystem on minor 0
[ 0.349820] imx-ipuv3 2400000.ipu: IPUv3H probed
[ 0.350674] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.350679] [drm] No driver support for vblank timestamp query.
[ 0.350811] imx-drm display-subsystem: bound imx-ipuv3-crtc.2 (ops 0x8084efac)
[ 0.350906] imx-drm display-subsystem: bound imx-ipuv3-crtc.3 (ops 0x8084efac)
[ 0.351005] imx-drm display-subsystem: bound imx-ipuv3-crtc.6 (ops 0x8084efac)
[ 0.351104] imx-drm display-subsystem: bound imx-ipuv3-crtc.7 (ops 0x8084efac)
[ 0.351589] imx-drm display-subsystem: bound 2000000.aips-bus:ldb (ops 0x8084f3ec)
[ 0.364884] bootsplash: Loading splash file (3072160 bytes)
[ 0.364925] bootsplash: Loaded (3072160 bytes, 1 pics, 1 blobs).
[ 0.523045] Console: switching to colour frame buffer device 160x50
[ 0.554466] imx-drm display-subsystem: fb0: frame buffer device
[ 0.555057] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1
Thank you!
Hi Fabien
after booting one can use "echo 0 > /sys/class/graphics/fb2/blank" to
enable the second LVDS display, then use the memtool to check
if ldb configured properly:
/unit_tests/memtool -32 0x020e0008 1 (LDB_CTRL)
/unit_tests/memtool -32 0x020e000c 1 (IOMUXC_GPR3, LVDSx_MUX_CTL)
In general nxp bsps from source.codeaurora.org/external/imx/linux-imx repository
linux-imx - i.MX Linux kernel
can support separate mode directly, one needs to set the video mode in kernel command line:
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";
};
};
One can change them to IPU1:
&ldb {
lvds-channel@0 {
crtc = "ipu1-di0";
};
lvds-channel@1 {
crtc = "ipu1-di1";
};
};
If Qt application is hard coded to open "fb0", it will render to fb0 all the time.
So custom application should open fb2 frame buffer device for using second lcd.
Also as shown in log "etnaviv-gpu" dirvers are used in the case, please note that nxp
does not support etnaviv, supported only vivante gpu drivers described in Linux 4.14.98_2.3.0 Documentation
Issues with "etnaviv-gpu" can be posted on meta-fsl-arm mailing list :
meta-freescale@lists.yoctoproject.org | Home
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
The sysfs file " /sys/class/graphics/fb2/blank" doesn't exist.
I tried also the command line parameters and device tree. Didn't work either.
Thanks for the advice about the driver. Maybe this is a problem specific for this driver.