msm: mdss: hdmi: increase maximum edid read retries
Some HDMI sinks may not have EDID ready immediately after asserting HPD. Increasing the maximum number of read retries of the first EDID block to ensure that EDID read is successful. Change-Id: Ia8e49f3e8f6beca84ecb584dcb40446a8657edb0 Signed-off-by: Casey Piper <cpiper@codeaurora.org>
This commit is contained in:
parent
acab8b7e1b
commit
3bfef91a9d
1 changed files with 8 additions and 5 deletions
|
@ -39,6 +39,8 @@
|
|||
/* Support for first 5 EDID blocks */
|
||||
#define MAX_EDID_BLOCK_SIZE (0x80 * 5)
|
||||
|
||||
#define MAX_EDID_READ_RETRY 5
|
||||
|
||||
#define BUFF_SIZE_3D 128
|
||||
|
||||
enum data_block_types {
|
||||
|
@ -541,7 +543,7 @@ static int hdmi_edid_read_block(struct hdmi_edid_ctrl *edid_ctrl, int block,
|
|||
u32 ndx, check_sum, print_len;
|
||||
int block_size;
|
||||
int i, status;
|
||||
int retry_cnt = 0;
|
||||
int retry_cnt = 0, checksum_retry = 0;
|
||||
struct hdmi_tx_ddc_data ddc_data;
|
||||
b = edid_buf;
|
||||
|
||||
|
@ -579,7 +581,7 @@ read_retry:
|
|||
if (status)
|
||||
break;
|
||||
}
|
||||
|
||||
if (retry_cnt++ >= MAX_EDID_READ_RETRY)
|
||||
block_size /= 2;
|
||||
} while (status && (block_size >= 16));
|
||||
|
||||
|
@ -599,8 +601,9 @@ read_retry:
|
|||
ndx, ndx+3,
|
||||
b[ndx+0], b[ndx+1], b[ndx+2], b[ndx+3]);
|
||||
status = -EPROTO;
|
||||
if (retry_cnt++ < 3) {
|
||||
DEV_DBG("Retrying reading EDID %d time\n", retry_cnt);
|
||||
if (checksum_retry++ < 3) {
|
||||
DEV_DBG("Retrying reading EDID %d time\n",
|
||||
checksum_retry);
|
||||
goto read_retry;
|
||||
}
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Reference in a new issue