]> code.ossystems Code Review - bsp/u-boot.git/commitdiff
mx6sabre_common: Dynamically change the video output
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 9 Nov 2015 16:04:31 +0000 (14:04 -0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Thu, 14 Jul 2016 17:52:37 +0000 (14:52 -0300)
Use the 'hdmidetect' command in U-boot to load the appropriate
video arguments. If HDMI is connected during boot then make HDMI
as the primary framebuffer, otherwise let LVDS be the primary framebuffer.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
include/configs/mx6sabre_common.h

index fe0873e0c5bc75dbcee5f47e5282cac4c8d6ec8d..83e9df61dc296e7ca2286ec9fa349944f8cf486f 100644 (file)
 #define VIDEO_ARGS_SCRIPT ""
 #endif
 
+#define CONFIG_PREBOOT \
+       "if hdmidet; then " \
+               "setenv video_interfaces hdmi lvds; " \
+       "else " \
+               "setenv video_interfaces lvds hdmi; " \
+       "fi;"
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "script=boot.scr\0" \
        "image=zImage\0" \
        "video_args_lcd=setenv video_args $video_args " \
                "video=mxcfb${fb}:dev=lcd,CLAA-WVGA,if=RGB666\0" \
        "fb=0\0" \
-       "video_interfaces=hdmi lvds lcd\0" \
        "video_args_script=" \
                "for v in ${video_interfaces}; do " \
                        "run video_args_${v}; " \
 #define CONFIG_IPUV3_CLK 264000000
 #endif
 #define CONFIG_IMX_HDMI
+#define CONFIG_CMD_HDMIDETECT
 #define CONFIG_IMX_VIDEO_SKIP
 
 #ifndef CONFIG_SPL