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

Commit fc8be993 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

msm: mdss: hdmi: Proper DDC power off sequence



Shutdown the power for DDC (Display Data Channel) module only
after HDCP (High-bandwidth Digital content Protection) module
has been turned off as HDCP continue to use DDC line until it
is turned off. Also, no need to check for DDC hardware status
on HDCP off as once the cable is disconnected it will not be
updated.

Change-Id: Ic5b8c2d6c4a43bf7d0ed0d420690b7e84bbe3b6c
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 4bb26321
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1185,9 +1185,6 @@ void hdmi_hdcp_off(void *input)

	DSS_REG_W(io, HDMI_HDCP_RESET, BIT(0));

	/* Wait to be clean on DDC HW engine */
	hdmi_hdcp_hw_ddc_clean(hdcp_ctrl);

	/* Disable encryption and disable the HDCP block */
	DSS_REG_W(io, HDMI_HDCP_CTRL, 0);

+9 −2
Original line number Diff line number Diff line
@@ -1061,8 +1061,12 @@ static void hdmi_tx_hpd_int_work(struct work_struct *work)
		hdmi_tx_set_audio_switch_node(hdmi_ctrl, 0, false);
		hdmi_tx_wait_for_audio_engine(hdmi_ctrl);

		if (hdmi_tx_enable_power(hdmi_ctrl, HDMI_TX_DDC_PM, false))
			DEV_WARN("%s: Failed to disable ddc power\n", __func__);
		if (!hdmi_ctrl->panel_power_on) {
			if (hdmi_tx_enable_power(hdmi_ctrl, HDMI_TX_DDC_PM,
				false))
				DEV_WARN("%s: Failed to disable ddc power\n",
					__func__);
		}

		hdmi_tx_send_cable_notification(hdmi_ctrl, 0);
		DEV_INFO("%s: sense cable DISCONNECTED: state switch to %d\n",
@@ -2430,6 +2434,9 @@ static void hdmi_tx_power_off_work(struct work_struct *work)
		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__);

	if (!hdmi_tx_is_dvi_mode(hdmi_ctrl))
		hdmi_tx_audio_off(hdmi_ctrl);