From b3e68382ffcfdff0dbbdc9d3cc06f8132c014e65 Mon Sep 17 00:00:00 2001 From: Ajay Singh Parmar Date: Sun, 22 Nov 2015 18:06:34 -0800 Subject: msm: mdss: hdmi: add dynamic encryption enable support Implement qseecomm API to send command to TZ to enable/disable encryption based on hdcp status. Enable encryption when hdcp part 1 is successful and disable it when cable is disconnected or authentication fails. Change-Id: Ia5e1a5927dad36abc3093b16638879be823c84df Signed-off-by: Ajay Singh Parmar --- drivers/video/fbdev/msm/mdss_hdmi_tx.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/video/fbdev') diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index ed66718c5e5c..71763ef74caf 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -1359,8 +1359,16 @@ static void hdmi_tx_hdcp_cb_work(struct work_struct *work) rc = hdmi_tx_config_avmute(hdmi_ctrl, false); hdmi_tx_set_audio_switch_node(hdmi_ctrl, 1); } + + if (hdmi_ctrl->hdcp1_use_sw_keys && hdmi_ctrl->hdcp14_present) + hdcp1_set_enc(true); break; case HDCP_STATE_AUTH_FAIL: + if (hdmi_ctrl->hdcp1_use_sw_keys && hdmi_ctrl->hdcp14_present) { + if (hdmi_ctrl->auth_state) + hdcp1_set_enc(false); + } + hdmi_ctrl->auth_state = false; if (hdmi_tx_is_encryption_set(hdmi_ctrl) || -- cgit v1.2.3