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

Commit 172ea1ed authored by Abhinav Kumar's avatar Abhinav Kumar
Browse files

drm/msm: disable HDCP before turning off timing engine



As per the hardware programming sequence, HDCP authentication
process must start after turning ON the timing engine and the
authentication process should be stopped before turning OFF
the timing engine.

Implement this sequence during the HDMI turn OFF sequence.

Also, make sure to wait for one frame before disabling the DDC
while turning OFF the HDCP. This is required to make sure we
receive the HDCP encryption disabled interrupt before disabling
the HW.

Change-Id: I3174f51fe1b6ab578db2d38caaf761444e6ebd8f
Signed-off-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
parent d33ed6b2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -578,6 +578,9 @@ static void _sde_hdmi_bridge_disable(struct drm_bridge *bridge)
	display->sink_hdcp_ver = SDE_HDMI_HDCP_NONE;
	display->sink_hdcp22_support = false;

	if (sde_hdmi_tx_is_hdcp_enabled(display))
		sde_hdmi_hdcp_off(display);

	sde_hdmi_clear_hdr_info(bridge);
	mutex_unlock(&display->display_lock);
}
@@ -592,9 +595,6 @@ static void _sde_hdmi_bridge_post_disable(struct drm_bridge *bridge)

	sde_hdmi_notify_clients(display, display->connected);

	if (sde_hdmi_tx_is_hdcp_enabled(display))
		sde_hdmi_hdcp_off(display);

	sde_hdmi_audio_off(hdmi);

	DRM_DEBUG("power down");
+8 −2
Original line number Diff line number Diff line
@@ -234,10 +234,16 @@ static void sde_hdmi_hdcp2p2_off(void *input)

	flush_kthread_worker(&ctrl->worker);

	sde_hdmi_hdcp2p2_ddc_disable((void *)ctrl->init_data.cb_data);

	cdata.context = input;
	sde_hdmi_hdcp2p2_wakeup(&cdata);

	/* There could be upto one frame delay
	 * between the time encryption disable is
	 * requested till the time we get encryption
	 * disabled interrupt
	 */
	msleep(20);
	sde_hdmi_hdcp2p2_ddc_disable((void *)ctrl->init_data.cb_data);
}

static int sde_hdmi_hdcp2p2_authenticate(void *input)