]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/imx-common/video.c
tegra: dts: Sync up nyan-big files with Linux
[u-boot] / arch / arm / imx-common / video.c
index 098239a7165d9f568a52b52941353c752c5618b8..46f8a1e1dc1f20e99d580d20d2a04c8873c9019d 100644 (file)
@@ -6,14 +6,12 @@
 #include <asm/errno.h>
 #include <asm/imx-common/video.h>
 
-extern struct display_info_t const displays[];
-extern size_t display_count;
-
 int board_video_skip(void)
 {
        int i;
        int ret;
        char const *panel = getenv("panel");
+
        if (!panel) {
                for (i = 0; i < display_count; i++) {
                        struct display_info_t const *dev = displays+i;
@@ -34,11 +32,14 @@ int board_video_skip(void)
                                break;
                }
        }
+
        if (i < display_count) {
                ret = ipuv3_fb_init(&displays[i].mode, 0,
                                    displays[i].pixfmt);
                if (!ret) {
-                       displays[i].enable(displays+i);
+                       if (displays[i].enable)
+                               displays[i].enable(displays + i);
+
                        printf("Display: %s (%ux%u)\n",
                               displays[i].mode.name,
                               displays[i].mode.xres,
@@ -53,3 +54,13 @@ int board_video_skip(void)
 
        return 0;
 }
+
+#ifdef CONFIG_IMX_HDMI
+#include <asm/arch/mxc_hdmi.h>
+#include <asm/io.h>
+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