VAR-SOM-MX6 Dual Displays: Difference between revisions
(Add category Debian) |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{PageHeader|VAR-SOM-MX6 Dual Displays}} | |||
{{DocImage|category1=Yocto|category2=Debian}} [[category:VAR-SOM-MX6]] __toc__ | |||
= Use Dual Displays: LVDS & HDMI = | = Use Dual Displays: LVDS & HDMI = | ||
1. Set the LVDS's display controllers to use same IPU in device tree.<br> | 1. Set the LVDS's display controllers to use same IPU in device tree.<br> | ||
Line 26: | Line 28: | ||
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: | 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: | ||
<pre> | <pre> | ||
setenv videoargs 'setenv bootargs ${bootargs} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:dev=ldb,800x480M@60,if=RGB24 | setenv videoargs 'setenv bootargs ${bootargs} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:dev=ldb,800x480M@60,if=RGB24;' | ||
</pre> | </pre> | ||
<br> | <br> |
Latest revision as of 18:34, 6 June 2023
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
b/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.
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