diff options
| author | Sandeep Panda <spanda@codeaurora.org> | 2016-06-08 09:20:42 +0530 |
|---|---|---|
| committer | Harsh Sahu <hsahu@codeaurora.org> | 2016-12-12 14:06:51 -0800 |
| commit | 306732cd443da8774c229e48d19f0ad61d8da0ce (patch) | |
| tree | 65af1701bd3130a9f35551c95d4a996ee6ff33cb | |
| parent | 4c6bee77c35fd1de7667efdd282a5280d99997c5 (diff) | |
msm: mdss: try to read EDID again in case of read errors
As per HDMI specification a source should try to re-read the EDID
in case there is error during the EDID buffer read, like checksum
mismatch or EDID header not correct. So retry for maximum allowed
attempts when EDID read fails due to any reason.
Change-Id: I04b222271cf22834dc0ea6355cd78a7492e24f27
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index 66e7c749e595..4c303224ba95 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -1707,7 +1707,7 @@ static int hdmi_tx_read_edid(struct hdmi_tx_ctrl *hdmi_ctrl) check_sum += ebuf[ndx]; if (check_sum & 0xFF) { - DEV_ERR("%s: checksome mismatch\n", __func__); + DEV_ERR("%s: checksum mismatch\n", __func__); ret = -EINVAL; goto end; } @@ -2262,6 +2262,8 @@ static void hdmi_tx_update_deep_color(struct hdmi_tx_ctrl *hdmi_ctrl) static void hdmi_tx_hpd_int_work(struct work_struct *work) { struct hdmi_tx_ctrl *hdmi_ctrl = NULL; + int rc = -EINVAL; + int retry = MAX_EDID_READ_RETRY; hdmi_ctrl = container_of(work, struct hdmi_tx_ctrl, hpd_int_work); if (!hdmi_ctrl) { @@ -2280,7 +2282,10 @@ static void hdmi_tx_hpd_int_work(struct work_struct *work) hdmi_ctrl->hpd_state ? "CONNECT" : "DISCONNECT"); if (hdmi_ctrl->hpd_state) { - hdmi_tx_read_sink_info(hdmi_ctrl); + while (rc && retry--) + rc = hdmi_tx_read_sink_info(hdmi_ctrl); + if (!retry && rc) + pr_warn_ratelimited("%s: EDID read failed\n", __func__); hdmi_tx_update_deep_color(hdmi_ctrl); hdmi_tx_send_cable_notification(hdmi_ctrl, true); |
