From: Fabio Estevam Date: Mon, 9 Nov 2015 16:04:31 +0000 (-0200) Subject: mx6sabre_common: Dynamically change the video output X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=d2a85fe0531328a6c011de350c890f94caad9596;p=bsp%2Fu-boot.git mx6sabre_common: Dynamically change the video output 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 Signed-off-by: Otavio Salvador --- diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 1eb40bf71d..ff408fb29e 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -75,6 +75,13 @@ #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" \ @@ -113,7 +120,6 @@ "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}; " \ @@ -244,6 +250,7 @@ #define CONFIG_IPUV3_CLK 264000000 #endif #define CONFIG_IMX_HDMI +#define CONFIG_CMD_HDMIDETECT #define CONFIG_IMX_VIDEO_SKIP #ifndef CONFIG_SPL