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

Commit 10d26193 authored by Narender Ankam's avatar Narender Ankam Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: hdmi: clear EDID parsed data



In current HDMI driver, previous EDID's parsed data is being
cleared only if current EDID is successfully read and
hdmi_edid_parser() is called which indeed calls
hdmi_edid_reset_parser(). If current EDID failed to read
successfully, stale EDID parsed data from previous connection
is being retained.
So, always clear EDID parsed data on disconnection instead
of clearing it at the time of parsing new EDID.

Change-Id: Icd59fe402ee9190098e990978aa55785cb8dbd8d
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
Signed-off-by: default avatarRamendra Kumar <ramendra@codeaurora.org>
parent 3ee7a976
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
/* Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2017,2019-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -192,8 +192,10 @@ static bool hdmi_edid_is_mode_supported(struct hdmi_edid_ctrl *edid_ctrl,
	return true;
}

static int hdmi_edid_reset_parser(struct hdmi_edid_ctrl *edid_ctrl)
int hdmi_edid_reset_parser(void *input)
{
	struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;

	if (!edid_ctrl) {
		DEV_ERR("%s: invalid input\n", __func__);
		return -EINVAL;
@@ -2445,7 +2447,7 @@ int hdmi_edid_parser(void *input)
	}

	/* reset edid data for new hdmi connection */
	hdmi_edid_reset_parser(edid_ctrl);
	hdmi_edid_reset_parser(input);

	edid_buf = edid_ctrl->edid_buf;

+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2017,2019-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -69,6 +69,7 @@ struct hdmi_edid_override_data {
};

int hdmi_edid_parser(void *edid_ctrl);
int hdmi_edid_reset_parser(void *edid_ctrl);
u32 hdmi_edid_get_raw_data(void *edid_ctrl, u8 *buf, u32 size);
u8 hdmi_edid_get_sink_scaninfo(void *edid_ctrl, u32 resolution);
bool hdmi_edid_is_dvi_mode(void *input);
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2017,2019-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3395,6 +3395,8 @@ static int hdmi_tx_power_off(struct hdmi_tx_ctrl *hdmi_ctrl)
	if (hdmi_ctrl->hdmi_tx_hpd_done)
		hdmi_ctrl->hdmi_tx_hpd_done(
			hdmi_ctrl->downstream_data);

	hdmi_edid_reset_parser(hdmi_tx_get_fd(HDMI_TX_FEAT_EDID));
end:
	DEV_INFO("%s: HDMI Core: OFF\n", __func__);
	return 0;