Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 683f5223 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

msm: mdss: hdmi: HDCP and Tx core power off sequence



Power off HDCP first before powering off timing generator and
Tx core to make sure last VSYNC is received before the HDMI
clocks are off and there are no side effects like snow screen
on HDCP.

Change-Id: I1c5e9761b77d559f42ce0a0982642dac6dd9f1d8
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 7ab1b9a7
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -2649,11 +2649,6 @@ static void hdmi_tx_power_off_work(struct work_struct *work)
		return;
	}

	if (hdmi_ctrl->hdcp_feature_on && hdmi_ctrl->present_hdcp) {
		DEV_DBG("%s: Turning off HDCP\n", __func__);
		hdmi_hdcp_off(hdmi_ctrl->feature_data[HDMI_TX_FEAT_HDCP]);
	}

	if (hdmi_tx_enable_power(hdmi_ctrl, HDMI_TX_DDC_PM, false))
		DEV_WARN("%s: Failed to disable ddc power\n", __func__);

@@ -3245,18 +3240,23 @@ static int hdmi_tx_panel_event_handler(struct mdss_panel_data *panel_data,
		break;

	case MDSS_EVENT_BLANK:
		if (hdmi_ctrl->hdcp_feature_on && hdmi_ctrl->present_hdcp) {
			DEV_DBG("%s: Turning off HDCP\n", __func__);
			hdmi_hdcp_off(
				hdmi_ctrl->feature_data[HDMI_TX_FEAT_HDCP]);
		}
		break;

	case MDSS_EVENT_PANEL_OFF:
		if (hdmi_ctrl->panel_power_on) {
			rc = hdmi_tx_power_off(panel_data);
			if (rc)
				DEV_ERR("%s: hdmi_tx_power_off failed.rc=%d\n",
					__func__, rc);

		} else {
			DEV_DBG("%s: hdmi is already powered off\n", __func__);
		}
		break;

	case MDSS_EVENT_PANEL_OFF:
		hdmi_ctrl->timing_gen_on = false;
		break;