disp: msm: dp: Avoid double authentication if first is still in progress

In scenarios where two streams become active in a short time period, HDCP
authentication may incorrectly be kicked off twice. This occurs due to the
HDCP state machine not indicating when authentication is already in
progress.

Update the dp_dispay HDCP state machine to only transfer to the
authenticating state once authentication has begun.

Change-Id: I38211203afe5127b80353c02072032a56e518900
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
This commit is contained in:
Christopher Braga
2019-04-22 16:42:16 -04:00
parent 9b4453096a
commit c24090b2c5

View File

@@ -344,7 +344,6 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)
dp_display_update_hdcp_status(dp, true); dp_display_update_hdcp_status(dp, true);
return; return;
} }
status->hdcp_state = HDCP_STATE_AUTHENTICATING;
} else { } else {
dp_display_update_hdcp_status(dp, true); dp_display_update_hdcp_status(dp, true);
return; return;
@@ -369,10 +368,12 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)
ops->force_encryption(data, dp->debug->force_encryption); ops->force_encryption(data, dp->debug->force_encryption);
switch (status->hdcp_state) { switch (status->hdcp_state) {
case HDCP_STATE_AUTHENTICATING: case HDCP_STATE_INACTIVE:
dp_display_hdcp_register_streams(dp); dp_display_hdcp_register_streams(dp);
if (dp->hdcp.ops && dp->hdcp.ops->authenticate) if (dp->hdcp.ops && dp->hdcp.ops->authenticate)
rc = dp->hdcp.ops->authenticate(data); rc = dp->hdcp.ops->authenticate(data);
if (!rc)
status->hdcp_state = HDCP_STATE_AUTHENTICATING;
break; break;
case HDCP_STATE_AUTH_FAIL: case HDCP_STATE_AUTH_FAIL:
if (dp_display_is_ready(dp) && dp->power_on) { if (dp_display_is_ready(dp) && dp->power_on) {