Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39a0d669 authored by Abhishek Kharbanda's avatar Abhishek Kharbanda Committed by Stephen Boyd
Browse files

msm: hdmi: Re-read EDID on checksum error.



Re-read EDID buffer multiple times in case of
checksum error.

Change-Id: I30c9b2245ceb27a7768bf0d9cd9b66c81beff19e
CRs-Fixed: 492053
Signed-off-by: default avatarAbhishek Kharbanda <akharban@codeaurora.org>
parent b1b28fa9
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -366,8 +366,9 @@ static int hdmi_edid_read_block(struct hdmi_edid_ctrl *edid_ctrl, int block,
{
	const u8 *b = NULL;
	u32 ndx, check_sum, print_len;
	int block_size = 0x80;
	int block_size;
	int i, status;
	int retry_cnt = 0;
	struct hdmi_tx_ddc_data ddc_data;
	b = edid_buf;

@@ -376,6 +377,9 @@ static int hdmi_edid_read_block(struct hdmi_edid_ctrl *edid_ctrl, int block,
		return -EINVAL;
	}

read_retry:
	block_size = 0x80;
	status = 0;
	do {
		DEV_DBG("EDID: reading block(%d) with block-size=%d\n",
			block, block_size);
@@ -422,6 +426,10 @@ static int hdmi_edid_read_block(struct hdmi_edid_ctrl *edid_ctrl, int block,
				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);
			goto read_retry;
		}
		goto error;
	}