VAR-SOM-MX6 Dual Displays

From Variscite Wiki
VAR-SOM-MX6 Dual Displays

1 Use Dual Displays: LVDS & HDMI

1. Set the LVDS's display controllers to use same IPU in device tree.
For example, using the MX6CustomBoard with VAR-SOM-MX6 Quad SOM, use the following patch and compile a new imx6q-var-som.dtb

diff --git a/arch/arm/boot/dts/imx6q-var-som.dts
index 5eeda5c..fc4dec4 100644
--- a/arch/arm/boot/dts/imx6q-var-som.dts
+++ b/arch/arm/boot/dts/imx6q-var-som.dts
@@ -145,11 +145,11 @@

 &ldb {
        lvds-channel@0 {
-               crtc = "ipu1-di0";
+               crtc = "ipu2-di0";

        lvds-channel@1 {
-               crtc = "ipu2-di0";
+               crtc = "ipu2-di1";

2. Change the videoargs variable in the U-Boot environment.
In this example, HDMI is set to be the primary screen and LVDS to be the secondary - you can switch mxcfb0 and mxcfb1 if you want it the other way around:

setenv videoargs 'setenv bootargs ${bootargs} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:dev=ldb,800x480M@60,if=RGB24;'

3. Activate the secondary display:

echo 0 > /sys/class/graphics/fb2/blank

At this point you should see the desktop on the primary screen, and a black screen on the secondary.

/dev/fb0  is the primary screen, and  /dev/fb1  is its overlay.
/dev/fb2  is the secondary screen, and  /dev/fb3  is its overlay.

1.1 Display modes

Following are some commands to get and set the display mode of each screen.

Print the current display mode on each display (if you don't change it, it should be like in the U-Boot bootargs in step 2):

cat /sys/class/graphics/fb0/mode
cat /sys/class/graphics/fb2/mode

List the supported modes for each display:

cat /sys/class/graphics/fb0/modes
cat /sys/class/graphics/fb2/modes

Set the current mode to one of the supported modes:

echo A_SUPPORTED_MODE > /sys/class/graphics/fb0/mode
echo A_SUPPORTED_MODE > /sys/class/graphics/fb2/mode