]> 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>
Wed, 23 Mar 2016 18:01:50 +0000 (15:01 -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 9ca26f833593beccf12888ae9827309f206ea51e..3a1850f6661a24711a247df8d9a4f7d9cdef6511 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_VIDEO_BMP_LOGO
 #define CONFIG_IPUV3_CLK 260000000
 #define CONFIG_IMX_HDMI
+#define CONFIG_CMD_HDMIDETECT
 #define CONFIG_IMX_VIDEO_SKIP
 
 #ifndef CONFIG_SPL