diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-25 18:12:56 +0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 17:16:45 +0400 |
commit | 470245652d98274568ac81a875c8312e73a433ef (patch) | |
tree | ceb154e43adf8ab7a13cd765365dc953bea50d2f /drivers/video/omap2/dss/hdmi.c | |
parent | fa70dc5f472ddc261ad429f2c12eb7ac31c90b87 (diff) | |
download | linux-470245652d98274568ac81a875c8312e73a433ef.tar.xz |
OMAP: DSS2: HDMI: implement read_edid()
Implement read_edid() for HDMI by implementing necessary functions to
hdmi.c and to hdmi_omap4_panel.c.
Cc: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/hdmi.c')
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index f503aa495b2f..8a04ee18d58f 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -372,7 +372,7 @@ static void hdmi_read_edid(struct omap_video_timings *dp) if (!hdmi.edid_set) ret = hdmi.ip_data.ops->read_edid(&hdmi.ip_data, hdmi.edid, HDMI_EDID_MAX_LENGTH); - if (!ret) { + if (ret > 0) { if (!memcmp(hdmi.edid, edid_header, sizeof(edid_header))) { /* search for timings of default resolution */ get_edid_timing_data(hdmi.edid); @@ -587,6 +587,23 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev) } } +int omapdss_hdmi_read_edid(u8 *buf, int len) +{ + int r; + + mutex_lock(&hdmi.lock); + + r = hdmi_runtime_get(); + BUG_ON(r); + + r = hdmi.ip_data.ops->read_edid(&hdmi.ip_data, buf, len); + + hdmi_runtime_put(); + mutex_unlock(&hdmi.lock); + + return r; +} + int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) { int r = 0; |