disp: msm: Ensure clean slate when starting and stopping HDCP

The DP HDCP layer fails to wait on and clear its internal thread
upon an HDCP stop or failure. This can result in use after free
failures if a read or write over aux channel operation is already
queued.

Update the DP HDCP layer to stop and wait on kthread completion
upon HDCP failures, and clear the kthread command queue before
resuming kthread execution. Additionally, ensure the SDE HDCP
worker thread correctly starts and stops execution upon HDCP
enablement and disablement respectively.

Change-Id: I4218d7935f89416b5e5d74afd8f5d22e031b9a38
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
This commit is contained in:
Christopher Braga
2019-05-02 18:04:44 -04:00
父節點 c24090b2c5
當前提交 7e9b80092b
共有 3 個文件被更改,包括 16 次插入5 次删除

查看文件

@@ -382,12 +382,12 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)
return;
}
dp_display_hdcp_register_streams(dp);
status->hdcp_state = HDCP_STATE_AUTHENTICATING;
if (ops && ops->reauthenticate) {
rc = ops->reauthenticate(data);
if (rc)
pr_err("failed rc=%d\n", rc);
}
status->hdcp_state = HDCP_STATE_AUTHENTICATING;
} else {
pr_debug("not reauthenticating, cable disconnected\n");
}