diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 9 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi_omap4_panel.c | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index fbf4a69cebc..8c32717b73c 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -483,6 +483,7 @@ void omapdss_hdmi_display_disable(struct omap_dss_device *dssdev); void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev); int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev, struct omap_video_timings *timings); +bool omapdss_hdmi_is_detected(struct omap_dss_device *dssdev); int omapdss_hdmi_get_edid(struct omap_dss_device *dssdev, u8 *buf, int len); int hdmi_panel_init(void); void hdmi_panel_exit(void); diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index fe1b6803c4b..fd0d57807c6 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -1204,6 +1204,15 @@ static void hdmi_power_off(struct omap_dss_device *dssdev) hdmi.edid_set = 0; } +bool omapdss_hdmi_is_detected(struct omap_dss_device *dssdev) +{ + u32 r; + + r = hdmi_read_reg(HDMI_CORE_SYS_SYS_STAT); + + return !!(r & 0x2); +} + int omapdss_hdmi_get_edid(struct omap_dss_device *dssdev, u8 *buf, int len) { if (!hdmi.edid_set) diff --git a/drivers/video/omap2/dss/hdmi_omap4_panel.c b/drivers/video/omap2/dss/hdmi_omap4_panel.c index e04960a0a20..9ab7f81796a 100644 --- a/drivers/video/omap2/dss/hdmi_omap4_panel.c +++ b/drivers/video/omap2/dss/hdmi_omap4_panel.c @@ -143,6 +143,11 @@ err: return r; } +static bool hdmi_panel_is_detected(struct omap_dss_device *dssdev) +{ + return omapdss_hdmi_is_detected(dssdev); +} + static int hdmi_get_edid(struct omap_dss_device *dssdev, u8 *buf, int len) { return omapdss_hdmi_get_edid(dssdev, buf, len); @@ -202,6 +207,7 @@ static struct omap_dss_driver hdmi_driver = { .disable = hdmi_panel_disable, .suspend = hdmi_panel_suspend, .resume = hdmi_panel_resume, + .is_detected = hdmi_panel_is_detected, .get_edid = hdmi_get_edid, .get_timings = hdmi_get_timings, .set_timings = hdmi_set_timings, |