summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Piper <cpiper@codeaurora.org>2015-06-10 10:53:43 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:42:57 -0700
commite0e29754fedfc962f687164adfaa3bfcdc236dc5 (patch)
tree2eff3629a91d7f58123e923b4261ac3c197c6b8e
parenta76691661c67ecb5d6791cfdbccd26e1a1c9d1f9 (diff)
msm: mdss: hdmi: return cable status only when HDMI is powered
When audio driver requests the cable status, return that the cable status is connected only when HDMI is powered. This prevents audio from accessing HDMI registers when HDMI clock is off. Change-Id: Icc5016df731725de25b4ca86e2ac3632ab89d5bf Signed-off-by: Casey Piper <cpiper@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_tx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
index 0ac5862d4f27..e4ea8abb24de 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
@@ -2786,7 +2786,7 @@ static int hdmi_tx_get_cable_status(struct platform_device *pdev, u32 vote)
}
spin_lock_irqsave(&hdmi_ctrl->hpd_state_lock, flags);
- hpd = hdmi_ctrl->hpd_state;
+ hpd = hdmi_ctrl->hpd_state && hdmi_ctrl->panel_power_on;
spin_unlock_irqrestore(&hdmi_ctrl->hpd_state_lock, flags);
hdmi_ctrl->vote_hdmi_core_on = false;
@@ -3235,10 +3235,6 @@ static int hdmi_tx_power_on(struct mdss_panel_data *panel_data)
return rc;
}
- mutex_lock(&hdmi_ctrl->power_mutex);
- hdmi_ctrl->panel_power_on = true;
- mutex_unlock(&hdmi_ctrl->power_mutex);
-
hdmi_cec_config(hdmi_ctrl->feature_data[HDMI_TX_FEAT_CEC]);
if (hdmi_ctrl->hpd_state) {
@@ -3251,6 +3247,10 @@ static int hdmi_tx_power_on(struct mdss_panel_data *panel_data)
return rc;
}
}
+
+ mutex_lock(&hdmi_ctrl->power_mutex);
+ hdmi_ctrl->panel_power_on = true;
+ mutex_unlock(&hdmi_ctrl->power_mutex);
end:
dss_reg_dump(io->base, io->len, "HDMI-ON: ", REG_DUMP);