X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Farm%2Fmach-imx%2Fvideo.c;h=1bc9b7cc7e1591061afbea0b3cc8a6ba8682b475;hb=c6ed3508bda58ab4a750eb11956f7779cc27e84d;hp=c670c5dfc9c23e9459caec50704315e52829d5ca;hpb=00caae6d47645e68d6e5277aceb69592b49381a6;p=oweals%2Fu-boot.git diff --git a/arch/arm/mach-imx/video.c b/arch/arm/mach-imx/video.c index c670c5dfc9..1bc9b7cc7e 100644 --- a/arch/arm/mach-imx/video.c +++ b/arch/arm/mach-imx/video.c @@ -1,15 +1,25 @@ -/* - * SPDX-License-Identifier: GPL-2.0+ - */ +// SPDX-License-Identifier: GPL-2.0+ #include +#include #include #include +#ifdef CONFIG_IMX_HDMI +#include +#include + +int detect_hdmi(struct display_info_t const *dev) +{ + struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; + return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT; +} +#endif + int board_video_skip(void) { int i; - int ret; + int ret = 0; char const *panel = env_get("panel"); if (!panel) { @@ -44,6 +54,11 @@ int board_video_skip(void) displays[i].mode.name, displays[i].mode.xres, displays[i].mode.yres); + +#ifdef CONFIG_IMX_HDMI + if (!strcmp(displays[i].mode.name, "HDMI")) + imx_enable_hdmi_phy(); +#endif } else printf("LCD %s cannot be configured: %d\n", displays[i].mode.name, ret); @@ -52,15 +67,10 @@ int board_video_skip(void) return -EINVAL; } - return 0; + return ret; } -#ifdef CONFIG_IMX_HDMI -#include -#include -int detect_hdmi(struct display_info_t const *dev) +int ipu_displays_init(void) { - struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; - return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT; + return board_video_skip(); } -#endif