diff options
| author | Narender Ankam <nankam@codeaurora.org> | 2020-01-24 19:36:33 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-03-30 04:42:37 -0700 |
| commit | 10d2619384a59579df5938240c5f89a997b5ce24 (patch) | |
| tree | 250db197ce70d8005d6344d728b541eef179eeb4 /drivers/video/fbdev | |
| parent | 3ee7a97688b46dc830a032e881e9d726a9430130 (diff) | |
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: Narender Ankam <nankam@codeaurora.org>
Signed-off-by: Ramendra Kumar <ramendra@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_edid.c | 8 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_edid.h | 3 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.c | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_edid.c b/drivers/video/fbdev/msm/mdss_hdmi_edid.c index cb4ef1781dfb..6f0234500d70 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_edid.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_edid.c @@ -1,4 +1,4 @@ -/* 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; diff --git a/drivers/video/fbdev/msm/mdss_hdmi_edid.h b/drivers/video/fbdev/msm/mdss_hdmi_edid.h index ae4f47ca42aa..d258aa9f95bc 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_edid.h +++ b/drivers/video/fbdev/msm/mdss_hdmi_edid.h @@ -1,4 +1,4 @@ -/* 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); diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index 79a6a16d4fed..905586d6ee69 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -1,4 +1,4 @@ -/* 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; |
