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

Commit cd75705a authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

msm: mdss: hdmi: fall back to legacy block when CEA block is bad



In case of CEA extension block is not correct or corrupted, fall
back to block 0 to read the resolutions supported.

Change-Id: I2b63ff1f918b3ece89ab35eb4a64d4ac96aaeabe
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 876f9283
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1228,6 +1228,7 @@ static void hdmi_edid_get_display_mode(struct hdmi_edid_ctrl *edid_ctrl,
	const u8 *svd = NULL;
	u32 has60hz_mode = false;
	u32 has50hz_mode = false;
	bool read_block0_res = false;
	struct hdmi_edid_sink_data *sink_data = NULL;

	if (!edid_ctrl || !data_buf) {
@@ -1242,9 +1243,9 @@ static void hdmi_edid_get_display_mode(struct hdmi_edid_ctrl *edid_ctrl,
			VIDEO_DATA_BLOCK, &len) : NULL;

	if (num_of_cea_blocks && (len == 0 || len > MAX_DATA_BLOCK_SIZE)) {
		DEV_DBG("%s: No/Invalid Video Data Block\n",
			__func__);
		return;
		DEV_DBG("%s: fall back to block 0 res\n", __func__);
		svd = NULL;
		read_block0_res = true;
	}

	sink_data = &edid_ctrl->sink_data;
@@ -1288,7 +1289,7 @@ static void hdmi_edid_get_display_mode(struct hdmi_edid_ctrl *edid_ctrl,
			if (video_format == HDMI_VFRMT_640x480p60_4_3)
				has480p = true;
		}
	} else if (!num_of_cea_blocks) {
	} else if (!num_of_cea_blocks || read_block0_res) {
		/* Detailed timing descriptors */
		u32 desc_offset = 0;
		/*