aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-08-25 10:12:56 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-30 09:16:45 -0400
commit470245652d98274568ac81a875c8312e73a433ef (patch)
treeceb154e43adf8ab7a13cd765365dc953bea50d2f /drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
parentfa70dc5f472ddc261ad429f2c12eb7ac31c90b87 (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.c37
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 403c6624147..d4cdfc2e6c5 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,
370{ 370{
371 int r = 0, n = 0, i = 0; 371 int r = 0, n = 0, i = 0;
372 int max_ext_blocks = (max_length / 128) - 1; 372 int max_ext_blocks = (max_length / 128) - 1;
373 int len;
373 374
374 r = hdmi_core_ddc_edid(ip_data, pedid, 0); 375 r = hdmi_core_ddc_edid(ip_data, pedid, 0);
375 if (r) { 376 if (r)
376 return r; 377 return r;
377 } else {
378 n = pedid[0x7e];
379 378
380 /* 379 len = 128;
381 * README: need to comply with max_length set by the caller. 380 n = pedid[0x7e];
382 * Better implementation should be to allocate necessary
383 * memory to store EDID according to nb_block field found
384 * in first block
385 */
386 if (n > max_ext_blocks)
387 n = max_ext_blocks;
388 381
389 for (i = 1; i <= n; i++) { 382 /*
390 r = hdmi_core_ddc_edid(ip_data, pedid, i); 383 * README: need to comply with max_length set by the caller.
391 if (r) 384 * Better implementation should be to allocate necessary
392 return r; 385 * memory to store EDID according to nb_block field found
393 } 386 * in first block
387 */
388 if (n > max_ext_blocks)
389 n = max_ext_blocks;
390
391 for (i = 1; i <= n; i++) {
392 r = hdmi_core_ddc_edid(ip_data, pedid, i);
393 if (r)
394 return r;
395 len += 128;
394 } 396 }
395 return 0; 397
398 return len;
396} 399}
397 400
398static void hdmi_core_init(struct hdmi_core_video_config *video_cfg, 401static void hdmi_core_init(struct hdmi_core_video_config *video_cfg,