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=c29b4676ad6f9ab0d09e6ddf2b42ffe32b9be26f;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 9ca26f8335..3a1850f666 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -79,6 +79,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" \ @@ -117,7 +124,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}; " \ @@ -250,6 +256,7 @@ #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