Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c24090b2 authored by Christopher Braga's avatar Christopher Braga
Browse files

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: default avatarChristopher Braga <cbraga@codeaurora.org>
parent 9b445309
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -344,7 +344,6 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)
				dp_display_update_hdcp_status(dp, true);
				return;
			}
			status->hdcp_state = HDCP_STATE_AUTHENTICATING;
		} else {
			dp_display_update_hdcp_status(dp, true);
			return;
@@ -369,10 +368,12 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)
		ops->force_encryption(data, dp->debug->force_encryption);

	switch (status->hdcp_state) {
	case HDCP_STATE_AUTHENTICATING:
	case HDCP_STATE_INACTIVE:
		dp_display_hdcp_register_streams(dp);
		if (dp->hdcp.ops && dp->hdcp.ops->authenticate)
			rc = dp->hdcp.ops->authenticate(data);
		if (!rc)
			status->hdcp_state = HDCP_STATE_AUTHENTICATING;
		break;
	case HDCP_STATE_AUTH_FAIL:
		if (dp_display_is_ready(dp) && dp->power_on) {