Merge "msm: mdss: hdmi: return cable status only when HDMI is powered"

This commit is contained in:
Linux Build Service Account 2015-06-15 06:39:20 -07:00 committed by Gerrit - the friendly Code Review server
commit 6d1276acf1

View file

@ -2901,7 +2901,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;
@ -3195,10 +3195,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);
if (hdmi_ctrl->hpd_state) {
rc = hdmi_tx_start(hdmi_ctrl);
if (rc) {
@ -3208,6 +3204,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);