diff options
| author | Ajay Singh Parmar <aparmar@codeaurora.org> | 2014-02-15 19:38:46 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:27:44 -0700 |
| commit | cfacfbed1f52b6893a9adf2c3d83b68f7d93b0cd (patch) | |
| tree | c7876ad78dbd346828345ee33156e4108f1562d4 /drivers/video/fbdev | |
| parent | 79a3229066a208b68db7190d074906f735848418 (diff) | |
msm: mdss: hdmi: wait for power off
Fast plug out/in of HDMI cable may result in race condition
between power on and off of HDMI tx core when downstream device
or bridge device is connected. Wait for power off to complete,
if already underway, before power on.
CRs-Fixed: 620429
Change-Id: I12cfa65052fa4e23fd1ad6d3f9ae45047d65970b
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.c | 13 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index 33d0c178e625..86fd3ce84abf 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -1221,6 +1221,17 @@ static void hdmi_tx_hpd_int_work(struct work_struct *work) DEV_DBG("%s: Got HPD interrupt\n", __func__); if (hdmi_ctrl->hpd_state) { + /* + * If a down stream device or bridge chip is attached to hdmi + * Tx core output, it is likely that it might be powering the + * hpd module ON/OFF on cable connect/disconnect as it would + * have its own mechanism of detecting cable. Flush power off + * work is needed in case there is any race condidtion between + * power off and on during fast cable plug in/out. + */ + if (hdmi_ctrl->ds_registered) + flush_work(&hdmi_ctrl->power_off_work); + if (hdmi_tx_enable_power(hdmi_ctrl, HDMI_TX_DDC_PM, true)) { DEV_ERR("%s: Failed to enable ddc power\n", __func__); return; @@ -2445,6 +2456,8 @@ int msm_hdmi_register_mhl(struct platform_device *pdev, ops->set_mhl_max_pclk = hdmi_tx_set_mhl_max_pclk; ops->set_upstream_hpd = hdmi_tx_set_mhl_hpd; + hdmi_ctrl->ds_registered = true; + return 0; } diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.h b/drivers/video/fbdev/msm/mdss_hdmi_tx.h index 366e1a8b4aca..865a7b325c37 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.h +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.h @@ -85,6 +85,7 @@ struct hdmi_tx_ctrl { bool hdcp_feature_on; bool hpd_disabled; + bool ds_registered; u32 present_hdcp; u8 spd_vendor_name[9]; |
