diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-25 10:12:56 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 09:16:45 -0400 |
commit | 470245652d98274568ac81a875c8312e73a433ef (patch) | |
tree | ceb154e43adf8ab7a13cd765365dc953bea50d2f /drivers/video/omap2/dss/hdmi_panel.c | |
parent | fa70dc5f472ddc261ad429f2c12eb7ac31c90b87 (diff) |
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_panel.c')
-rw-r--r-- | drivers/video/omap2/dss/hdmi_panel.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c index 8c851e624ee6..624f170a5e92 100644 --- a/drivers/video/omap2/dss/hdmi_panel.c +++ b/drivers/video/omap2/dss/hdmi_panel.c | |||
@@ -185,6 +185,29 @@ err: | |||
185 | return r; | 185 | return r; |
186 | } | 186 | } |
187 | 187 | ||
188 | static int hdmi_read_edid(struct omap_dss_device *dssdev, u8 *buf, int len) | ||
189 | { | ||
190 | int r; | ||
191 | |||
192 | mutex_lock(&hdmi.hdmi_lock); | ||
193 | |||
194 | if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { | ||
195 | r = omapdss_hdmi_display_enable(dssdev); | ||
196 | if (r) | ||
197 | goto err; | ||
198 | } | ||
199 | |||
200 | r = omapdss_hdmi_read_edid(buf, len); | ||
201 | |||
202 | if (dssdev->state == OMAP_DSS_DISPLAY_DISABLED || | ||
203 | dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) | ||
204 | omapdss_hdmi_display_disable(dssdev); | ||
205 | err: | ||
206 | mutex_unlock(&hdmi.hdmi_lock); | ||
207 | |||
208 | return r; | ||
209 | } | ||
210 | |||
188 | static struct omap_dss_driver hdmi_driver = { | 211 | static struct omap_dss_driver hdmi_driver = { |
189 | .probe = hdmi_panel_probe, | 212 | .probe = hdmi_panel_probe, |
190 | .remove = hdmi_panel_remove, | 213 | .remove = hdmi_panel_remove, |
@@ -195,6 +218,7 @@ static struct omap_dss_driver hdmi_driver = { | |||
195 | .get_timings = hdmi_get_timings, | 218 | .get_timings = hdmi_get_timings, |
196 | .set_timings = hdmi_set_timings, | 219 | .set_timings = hdmi_set_timings, |
197 | .check_timings = hdmi_check_timings, | 220 | .check_timings = hdmi_check_timings, |
221 | .read_edid = hdmi_read_edid, | ||
198 | .driver = { | 222 | .driver = { |
199 | .name = "hdmi_panel", | 223 | .name = "hdmi_panel", |
200 | .owner = THIS_MODULE, | 224 | .owner = THIS_MODULE, |