disp: msm: hdcp: reset authentication state for client initiated abort

Return EINVAL upon early exit/abort of authentication and
reset the authentication state.

Change-Id: I4862bbe55301eabef2a83849a551eb948f73569b
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
Rajat Gupta
2020-02-27 13:30:50 +05:30
committed by Tatenda Chipeperekwa
parent 2192810d8a
commit 84424a93e3

View File

@@ -1057,8 +1057,10 @@ static void sde_hdcp_1x_auth_work(struct work_struct *work)
return; return;
} }
if (atomic_read(&hdcp->abort)) if (atomic_read(&hdcp->abort)) {
rc = -EINVAL;
goto end; goto end;
}
hdcp->sink_r0_ready = false; hdcp->sink_r0_ready = false;
hdcp->reauth = false; hdcp->reauth = false;
@@ -1495,6 +1497,8 @@ static void sde_hdcp_1x_abort(void *data, bool abort)
atomic_set(&hdcp->abort, abort); atomic_set(&hdcp->abort, abort);
cancel_delayed_work_sync(&hdcp->hdcp_auth_work); cancel_delayed_work_sync(&hdcp->hdcp_auth_work);
flush_workqueue(hdcp->workq); flush_workqueue(hdcp->workq);
if (sde_hdcp_1x_state(HDCP_STATE_AUTHENTICATING))
hdcp->hdcp_state = HDCP_STATE_AUTH_FAIL;
} }
void *sde_hdcp_1x_init(struct sde_hdcp_init_data *init_data) void *sde_hdcp_1x_init(struct sde_hdcp_init_data *init_data)