From 9a595822307b1c521037c1276dec881b492d9313 Mon Sep 17 00:00:00 2001 From: Ajay Singh Parmar Date: Tue, 31 Jan 2017 17:35:13 -0800 Subject: [PATCH] msm: hdcp: enable encryption only if not done already Content Stream Management message can be sent multiple times after successful authentication. Encryption is enabled after receiving acknowledgment for Content Stream Management. Check if the encryption is already enabled, if so, do not enable it again. CRs-Fixed: 1114981 Change-Id: I429b2ca2bf9dc0986f8fee6a814538031336c53b Signed-off-by: Ajay Singh Parmar --- drivers/misc/hdcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/hdcp.c b/drivers/misc/hdcp.c index bd21f8cca2aa..460ffc79f566 100644 --- a/drivers/misc/hdcp.c +++ b/drivers/misc/hdcp.c @@ -2103,7 +2103,8 @@ static void hdcp_lib_msg_recvd(struct hdcp_lib_handle *handle) (rc == 0) && (rsp_buf->status == 0)) { pr_debug("Got Auth_Stream_Ready, nothing sent to rx\n"); - if (!hdcp_lib_enable_encryption(handle)) { + if (!handle->authenticated && + !hdcp_lib_enable_encryption(handle)) { handle->authenticated = true; cdata.cmd = HDMI_HDCP_WKUP_CMD_STATUS_SUCCESS;