disp: msm: dp: update min_enc_level only if link is authenticated

The min_enc_lvl update is asynchronous to the hdcp2x state machine and
can come anytime. In an instance where authentication with the sink is
continuously failing, the enforce engine blocks the hdcp22 secure content
playback and resets the min enc lvl. This is causing the sde_hdcp_2x_main
to perform a send message operation out of sync with the current
authentication attempt. This is causing the state machine to go into bad
state by changing the next message id, sometimes causing a pagefault error
in the sde_hdcp_2x_main while cp_irq is in progress. This change will
proceed with the min_enc_lvl change only when the mainlink is hdcp2p2
authenticated.

Change-Id: I977ac3a083b9593f8f7e760d4e477d4af424d5c9
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
Sankeerth Billakanti 2019-12-08 07:05:36 +05:30 committed by Tatenda Chipeperekwa
parent 69631c415c
commit 3ce95ac68e
2 changed files with 4 additions and 7 deletions

View File

@ -346,11 +346,6 @@ static void dp_hdcp2p2_min_level_change(void *client_ctx,
return;
}
if (!dp_hdcp2p2_is_valid_state(ctrl)) {
DP_ERR("invalid state\n");
return;
}
cdata.context = ctrl->lib_ctx;
cdata.min_enc_level = min_enc_level;
dp_hdcp2p2_wakeup_lib(ctrl, &cdata);

View File

@ -904,8 +904,10 @@ static int sde_hdcp_2x_wakeup(struct sde_hdcp_2x_wakeup_data *data)
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);
if (hdcp->authenticated) {
kfifo_put(&hdcp->cmd_q, data->cmd);
wake_up(&hdcp->wait_q);
}
break;
default:
kfifo_put(&hdcp->cmd_q, data->cmd);