Skip to content
Snippets Groups Projects
Commit e688a99c authored by Eric Benard's avatar Eric Benard Committed by Stefano Babic
Browse files

imx-common/video: add detect_hdmi


this function is used by several board together with board_video_skip
to detect if hdmi is plugged is order to select the display to use.
So move it in imx-common to share it.

Signed-off-by: default avatarEric Bénard <eric@eukrea.com>
parent 3cbeb0f0
No related branches found
No related tags found
No related merge requests found
...@@ -53,3 +53,13 @@ int board_video_skip(void) ...@@ -53,3 +53,13 @@ int board_video_skip(void)
return 0; 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
...@@ -17,4 +17,8 @@ struct display_info_t { ...@@ -17,4 +17,8 @@ struct display_info_t {
struct fb_videomode mode; struct fb_videomode mode;
}; };
#ifdef CONFIG_IMX_HDMI
extern int detect_hdmi(struct display_info_t const *dev);
#endif
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment