2 * SPDX-License-Identifier: GPL-2.0+
7 #include <asm/imx-common/video.h>
9 int board_video_skip(void)
13 char const *panel = getenv("panel");
15 for (i = 0; i < display_count; i++) {
16 struct display_info_t const *dev = displays+i;
17 if (dev->detect && dev->detect(dev)) {
18 panel = dev->mode.name;
19 printf("auto-detected panel %s\n", panel);
24 panel = displays[0].mode.name;
25 printf("No panel detected: default to %s\n", panel);
29 for (i = 0; i < display_count; i++) {
30 if (!strcmp(panel, displays[i].mode.name))
34 if (i < display_count) {
35 ret = ipuv3_fb_init(&displays[i].mode, 0,
38 displays[i].enable(displays+i);
39 printf("Display: %s (%ux%u)\n",
40 displays[i].mode.name,
41 displays[i].mode.xres,
42 displays[i].mode.yres);
44 printf("LCD %s cannot be configured: %d\n",
45 displays[i].mode.name, ret);
47 printf("unsupported panel %s\n", panel);
54 #ifdef CONFIG_IMX_HDMI
55 #include <asm/arch/mxc_hdmi.h>
57 int detect_hdmi(struct display_info_t const *dev)
59 struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
60 return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;