diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-25 17:12:56 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 16:16:45 +0300 |
commit | 470245652d98274568ac81a875c8312e73a433ef (patch) | |
tree | ceb154e43adf8ab7a13cd765365dc953bea50d2f /drivers/video/omap2/dss/ti_hdmi_4xxx_ip.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/ti_hdmi_4xxx_ip.c')
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index 403c66241477..d4cdfc2e6c5e 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c @@ -370,29 +370,32 @@ int ti_hdmi_4xxx_read_edid(struct hdmi_ip_data *ip_data, { int r = 0, n = 0, i = 0; int max_ext_blocks = (max_length / 128) - 1; + int len; r = hdmi_core_ddc_edid(ip_data, pedid, 0); - if (r) { + if (r) return r; - } else { - n = pedid[0x7e]; - /* - * README: need to comply with max_length set by the caller. - * Better implementation should be to allocate necessary - * memory to store EDID according to nb_block field found - * in first block - */ - if (n > max_ext_blocks) - n = max_ext_blocks; + len = 128; + n = pedid[0x7e]; - for (i = 1; i <= n; i++) { - r = hdmi_core_ddc_edid(ip_data, pedid, i); - if (r) - return r; - } + /* + * README: need to comply with max_length set by the caller. + * Better implementation should be to allocate necessary + * memory to store EDID according to nb_block field found + * in first block + */ + if (n > max_ext_blocks) + n = max_ext_blocks; + + for (i = 1; i <= n; i++) { + r = hdmi_core_ddc_edid(ip_data, pedid, i); + if (r) + return r; + len += 128; } - return 0; + + return len; } static void hdmi_core_init(struct hdmi_core_video_config *video_cfg, |