2 * SPDX-License-Identifier: GPL-2.0+
7 #include <asm/imx-common/video.h>
9 extern struct display_info_t const displays[];
10 extern size_t display_count;
12 int board_video_skip(void)
16 char const *panel = getenv("panel");
18 for (i = 0; i < display_count; i++) {
19 struct display_info_t const *dev = displays+i;
20 if (dev->detect && dev->detect(dev)) {
21 panel = dev->mode.name;
22 printf("auto-detected panel %s\n", panel);
27 panel = displays[0].mode.name;
28 printf("No panel detected: default to %s\n", panel);
32 for (i = 0; i < display_count; i++) {
33 if (!strcmp(panel, displays[i].mode.name))
37 if (i < display_count) {
38 ret = ipuv3_fb_init(&displays[i].mode, 0,
41 displays[i].enable(displays+i);
42 printf("Display: %s (%ux%u)\n",
43 displays[i].mode.name,
44 displays[i].mode.xres,
45 displays[i].mode.yres);
47 printf("LCD %s cannot be configured: %d\n",
48 displays[i].mode.name, ret);
50 printf("unsupported panel %s\n", panel);
57 #ifdef CONFIG_IMX_HDMI
58 #include <asm/arch/mxc_hdmi.h>
60 int detect_hdmi(struct display_info_t const *dev)
62 struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
63 return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;