From 93f59150d1288f3713c0a0d692324fe52572c80e Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 31 Jul 2012 17:51:13 -0500 Subject: OMAPDSS: workaround 'operation stopped while reading edid' error Signed-off-by: Rob Clark --- drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index 3050439a887..f152394179a 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c @@ -466,7 +466,7 @@ static int hdmi_core_ddc_edid(struct hdmi_ip_data *ip_data, /* IN_PROG */ if (REG_GET(base, HDMI_CORE_DDC_STATUS, 4, 4) == 0) { DSSERR("operation stopped when reading edid\n"); - return -EIO; + return -EPIPE; } t = 0; @@ -498,7 +498,9 @@ int ti_hdmi_4xxx_read_edid(struct hdmi_ip_data *ip_data, u8 *edid, int len) { int r, l; + int retry = 10; +again: if (len < 128) return -EINVAL; @@ -507,6 +509,8 @@ int ti_hdmi_4xxx_read_edid(struct hdmi_ip_data *ip_data, return r; r = hdmi_core_ddc_edid(ip_data, edid, 0); + if ((r == -EPIPE) && (--retry > 0)) + goto again; if (r) return r; @@ -514,6 +518,8 @@ int ti_hdmi_4xxx_read_edid(struct hdmi_ip_data *ip_data, if (len >= 128 * 2 && edid[0x7e] > 0) { r = hdmi_core_ddc_edid(ip_data, edid + 0x80, 1); + if ((r == -EPIPE) && (--retry > 0)) + goto again; if (r) return r; l += 128; -- cgit v1.2.3