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

Commit 0325fec7 authored by Tatenda Chipeperekwa's avatar Tatenda Chipeperekwa Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: dp: fix handling of EDID extension blocks



Current implementation assumes that the first extension
block of the EDID data always has the CEA extension tag.
This is incorrect and can lead to incorrect parsing of
resolution data. Fix this by removing the hardcoding of
the extension tag for the first extension block.

CRs-Fixed: 2027108
Change-Id: I5ef4cdb186591e291b2217db7ccec6f942d79ca4
Signed-off-by: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent 5921f209
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -953,7 +953,6 @@ int mdss_dp_edid_read(struct mdss_dp_drv_pdata *dp)
	int rlen, ret = 0;
	int edid_blk = 0, blk_num = 0, retries = 10;
	bool edid_parsing_done = false;
	const u8 cea_tag = 0x02;
	u32 const segment_addr = 0x30;
	u32 checksum = 0;
	bool phy_aux_update_requested = false;
@@ -1037,15 +1036,6 @@ int mdss_dp_edid_read(struct mdss_dp_drv_pdata *dp)
		} else {
			edid_blk++;
			blk_num++;

			/* fix dongle byte shift issue */
			if (edid_blk == 1 && edid_buf[0] != cea_tag) {
				u8 tmp[EDID_BLOCK_SIZE - 1];

				memcpy(tmp, edid_buf, EDID_BLOCK_SIZE - 1);
				edid_buf[0] = cea_tag;
				memcpy(edid_buf + 1, tmp, EDID_BLOCK_SIZE - 1);
			}
		}

		memcpy(dp->edid_buf + (edid_blk * EDID_BLOCK_SIZE),