From a382d900a3c4758e662b4dc037b7f749c11dd7aa Mon Sep 17 00:00:00 2001 From: Tatenda Chipeperekwa Date: Thu, 27 Jun 2019 19:02:52 -0700 Subject: [PATCH] disp: msm: hdcp: update encryption level on framework request Update the minimum encryption level only when there is a request to do so coming from the DRM framework. This will ensure that any previously set value will not be overwritten while processing other commands. Failure to preserve the minimum encryption level can result in secure content playback failure if the sink device is not updated with the correct value. Change-Id: Ie9a555a57617096fbdb9e46dd29a973b9223e237 Signed-off-by: Tatenda Chipeperekwa --- msm/sde_hdcp_2x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/msm/sde_hdcp_2x.c b/msm/sde_hdcp_2x.c index e8ea3db3666a..a3bc7b61854e 100644 --- a/msm/sde_hdcp_2x.c +++ b/msm/sde_hdcp_2x.c @@ -822,7 +822,6 @@ static int sde_hdcp_2x_wakeup(struct sde_hdcp_2x_wakeup_data *data) hdcp->timeout_left = data->timeout; hdcp->total_message_length = data->total_message_length; - hdcp->min_enc_level = data->min_enc_level; if (!completion_done(&hdcp->response_completion)) complete_all(&hdcp->response_completion); @@ -875,6 +874,11 @@ static int sde_hdcp_2x_wakeup(struct sde_hdcp_2x_wakeup_data *data) wake_up(&hdcp->wait_q); } break; + case HDCP_2X_CMD_MIN_ENC_LEVEL: + hdcp->min_enc_level = data->min_enc_level; + kfifo_put(&hdcp->cmd_q, data->cmd); + wake_up(&hdcp->wait_q); + break; default: kfifo_put(&hdcp->cmd_q, data->cmd); wake_up(&hdcp->wait_q);