Loading drivers/video/msm/mdss/mdss_hdmi_tx.c +13 −7 Original line number Diff line number Diff line Loading @@ -105,6 +105,7 @@ static int hdmi_tx_set_mhl_hpd(struct platform_device *pdev, uint8_t on); static int hdmi_tx_sysfs_enable_hpd(struct hdmi_tx_ctrl *hdmi_ctrl, int on); static irqreturn_t hdmi_tx_isr(int irq, void *data); static void hdmi_tx_hpd_off(struct hdmi_tx_ctrl *hdmi_ctrl); static int hdmi_tx_hpd_on(struct hdmi_tx_ctrl *hdmi_ctrl); static int hdmi_tx_enable_power(struct hdmi_tx_ctrl *hdmi_ctrl, enum hdmi_tx_power_module_type module, int enable); static int hdmi_tx_setup_tmds_clk_rate(struct hdmi_tx_ctrl *hdmi_ctrl); Loading Loading @@ -2941,7 +2942,8 @@ static int hdmi_tx_power_off(struct hdmi_tx_ctrl *hdmi_ctrl) hdmi_ctrl->panel_power_on = false; if (hdmi_ctrl->hpd_off_pending || hdmi_ctrl->panel_suspend) if (hdmi_ctrl->hpd_off_pending || hdmi_ctrl->panel_suspend || !hdmi_ctrl->pdata.pluggable) hdmi_tx_hpd_off(hdmi_ctrl); if (hdmi_ctrl->hdmi_tx_hpd_done) Loading @@ -2960,6 +2962,9 @@ static int hdmi_tx_power_on(struct hdmi_tx_ctrl *hdmi_ctrl) void *pdata = hdmi_tx_get_fd(HDMI_TX_FEAT_PANEL); void *edata = hdmi_tx_get_fd(HDMI_TX_FEAT_EDID); if (!hdmi_ctrl->pdata.pluggable) hdmi_tx_hpd_on(hdmi_ctrl); ret = hdmi_tx_check_clk_state(hdmi_ctrl, HDMI_TX_HPD_PM); if (ret) { DEV_ERR("%s: clocks not on\n", __func__); Loading Loading @@ -3052,8 +3057,9 @@ static void hdmi_tx_hpd_off(struct hdmi_tx_ctrl *hdmi_ctrl) /* Turn off HPD interrupts */ DSS_REG_W(io, HDMI_HPD_INT_CTRL, 0); if (hdmi_tx_is_cec_wakeup_en(hdmi_ctrl)) { /* non pluggable display should not enable wakeup interrupt */ if ((hdmi_tx_is_cec_wakeup_en(hdmi_ctrl) && hdmi_ctrl->pdata.pluggable)) { hdmi_ctrl->mdss_util->enable_wake_irq(&hdmi_tx_hw); } else { hdmi_ctrl->mdss_util->disable_irq(&hdmi_tx_hw); Loading Loading @@ -3148,7 +3154,6 @@ static int hdmi_tx_sysfs_enable_hpd(struct hdmi_tx_ctrl *hdmi_ctrl, int on) DEV_DBG("%s: %d\n", __func__, on); if (on) { hdmi_ctrl->hpd_off_pending = false; rc = hdmi_tx_hpd_on(hdmi_ctrl); } else { if (!hdmi_ctrl->panel_power_on) Loading Loading @@ -3697,10 +3702,11 @@ static int hdmi_tx_evt_handle_panel_on(struct hdmi_tx_ctrl *hdmi_ctrl) static int hdmi_tx_evt_handle_suspend(struct hdmi_tx_ctrl *hdmi_ctrl) { if (!hdmi_ctrl->hpd_feature_on) if ((!hdmi_ctrl->hpd_feature_on) || (hdmi_ctrl->panel_suspend == true)) goto end; if (!hdmi_ctrl->hpd_state && !hdmi_ctrl->panel_power_on) if ((!hdmi_ctrl->hpd_state && !hdmi_ctrl->panel_power_on) || (hdmi_ctrl->hpd_state && !hdmi_ctrl->pdata.pluggable)) hdmi_tx_hpd_off(hdmi_ctrl); hdmi_ctrl->panel_suspend = true; Loading Loading
drivers/video/msm/mdss/mdss_hdmi_tx.c +13 −7 Original line number Diff line number Diff line Loading @@ -105,6 +105,7 @@ static int hdmi_tx_set_mhl_hpd(struct platform_device *pdev, uint8_t on); static int hdmi_tx_sysfs_enable_hpd(struct hdmi_tx_ctrl *hdmi_ctrl, int on); static irqreturn_t hdmi_tx_isr(int irq, void *data); static void hdmi_tx_hpd_off(struct hdmi_tx_ctrl *hdmi_ctrl); static int hdmi_tx_hpd_on(struct hdmi_tx_ctrl *hdmi_ctrl); static int hdmi_tx_enable_power(struct hdmi_tx_ctrl *hdmi_ctrl, enum hdmi_tx_power_module_type module, int enable); static int hdmi_tx_setup_tmds_clk_rate(struct hdmi_tx_ctrl *hdmi_ctrl); Loading Loading @@ -2941,7 +2942,8 @@ static int hdmi_tx_power_off(struct hdmi_tx_ctrl *hdmi_ctrl) hdmi_ctrl->panel_power_on = false; if (hdmi_ctrl->hpd_off_pending || hdmi_ctrl->panel_suspend) if (hdmi_ctrl->hpd_off_pending || hdmi_ctrl->panel_suspend || !hdmi_ctrl->pdata.pluggable) hdmi_tx_hpd_off(hdmi_ctrl); if (hdmi_ctrl->hdmi_tx_hpd_done) Loading @@ -2960,6 +2962,9 @@ static int hdmi_tx_power_on(struct hdmi_tx_ctrl *hdmi_ctrl) void *pdata = hdmi_tx_get_fd(HDMI_TX_FEAT_PANEL); void *edata = hdmi_tx_get_fd(HDMI_TX_FEAT_EDID); if (!hdmi_ctrl->pdata.pluggable) hdmi_tx_hpd_on(hdmi_ctrl); ret = hdmi_tx_check_clk_state(hdmi_ctrl, HDMI_TX_HPD_PM); if (ret) { DEV_ERR("%s: clocks not on\n", __func__); Loading Loading @@ -3052,8 +3057,9 @@ static void hdmi_tx_hpd_off(struct hdmi_tx_ctrl *hdmi_ctrl) /* Turn off HPD interrupts */ DSS_REG_W(io, HDMI_HPD_INT_CTRL, 0); if (hdmi_tx_is_cec_wakeup_en(hdmi_ctrl)) { /* non pluggable display should not enable wakeup interrupt */ if ((hdmi_tx_is_cec_wakeup_en(hdmi_ctrl) && hdmi_ctrl->pdata.pluggable)) { hdmi_ctrl->mdss_util->enable_wake_irq(&hdmi_tx_hw); } else { hdmi_ctrl->mdss_util->disable_irq(&hdmi_tx_hw); Loading Loading @@ -3148,7 +3154,6 @@ static int hdmi_tx_sysfs_enable_hpd(struct hdmi_tx_ctrl *hdmi_ctrl, int on) DEV_DBG("%s: %d\n", __func__, on); if (on) { hdmi_ctrl->hpd_off_pending = false; rc = hdmi_tx_hpd_on(hdmi_ctrl); } else { if (!hdmi_ctrl->panel_power_on) Loading Loading @@ -3697,10 +3702,11 @@ static int hdmi_tx_evt_handle_panel_on(struct hdmi_tx_ctrl *hdmi_ctrl) static int hdmi_tx_evt_handle_suspend(struct hdmi_tx_ctrl *hdmi_ctrl) { if (!hdmi_ctrl->hpd_feature_on) if ((!hdmi_ctrl->hpd_feature_on) || (hdmi_ctrl->panel_suspend == true)) goto end; if (!hdmi_ctrl->hpd_state && !hdmi_ctrl->panel_power_on) if ((!hdmi_ctrl->hpd_state && !hdmi_ctrl->panel_power_on) || (hdmi_ctrl->hpd_state && !hdmi_ctrl->pdata.pluggable)) hdmi_tx_hpd_off(hdmi_ctrl); hdmi_ctrl->panel_suspend = true; Loading