2 * SPDX-License-Identifier: GPL-2.0+
6 #include <linux/errno.h>
7 #include <asm/mach-imx/video.h>
9 int board_video_skip(void)
13 char const *panel = env_get("panel");
16 for (i = 0; i < display_count; i++) {
17 struct display_info_t const *dev = displays+i;
18 if (dev->detect && dev->detect(dev)) {
19 panel = dev->mode.name;
20 printf("auto-detected panel %s\n", panel);
25 panel = displays[0].mode.name;
26 printf("No panel detected: default to %s\n", panel);
30 for (i = 0; i < display_count; i++) {
31 if (!strcmp(panel, displays[i].mode.name))
36 if (i < display_count) {
37 ret = ipuv3_fb_init(&displays[i].mode, displays[i].di ? 1 : 0,
40 if (displays[i].enable)
41 displays[i].enable(displays + i);
43 printf("Display: %s (%ux%u)\n",
44 displays[i].mode.name,
45 displays[i].mode.xres,
46 displays[i].mode.yres);
48 printf("LCD %s cannot be configured: %d\n",
49 displays[i].mode.name, ret);
51 printf("unsupported panel %s\n", panel);
58 #ifdef CONFIG_IMX_HDMI
59 #include <asm/arch/mxc_hdmi.h>
61 int detect_hdmi(struct display_info_t const *dev)
63 struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
64 return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;