diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig index 4f4e7aca4d..dcbb87e8b6 100644 --- a/configs/mx6sabreauto_defconfig +++ b/configs/mx6sabreauto_defconfig @@ -16,6 +16,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y CONFIG_SPL_LIBDISK_SUPPORT=y +CONFIG_CMD_HDMIDETECT=y CONFIG_NXP_BOARD_REVISION=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabreauto" CONFIG_FIT=y diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig index e527533059..00ec9d5e07 100644 --- a/configs/mx6sabresd_defconfig +++ b/configs/mx6sabresd_defconfig @@ -17,6 +17,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabresd" +CONFIG_CMD_HDMIDETECT=y CONFIG_FIT=y CONFIG_SPL_FIT_PRINT=y CONFIG_SPL_LOAD_FIT=y diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 951c483499..dba347f537 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -38,13 +38,15 @@ #define EMMC_ENV "" #endif -#ifndef VIDEO_ARGS -#define VIDEO_ARGS "" -#endif +#define VIDEO_ARGS "${video_args}" +#define VIDEO_ARGS_SCRIPT "run video_args_script; " -#ifndef VIDEO_ARGS_SCRIPT -#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" \ @@ -85,7 +87,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}; " \ diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 49c18eaa85..e8f52cee20 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -16,9 +16,6 @@ #define CONFIG_MXC_UART_BASE UART1_BASE #define CONSOLE_DEV "ttymxc0" -#define VIDEO_ARGS "${video_args}" -#define VIDEO_ARGS_SCRIPT "run video_args_script; " - #include "mx6sabre_common.h" /* Falcon Mode */