diff options
| author | Ajay Singh Parmar <aparmar@codeaurora.org> | 2015-11-02 14:58:21 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:47:36 -0700 |
| commit | d4e9e455d69dc29a947bd773e3562b1cac41c811 (patch) | |
| tree | 8fe29a7be7f78df14703fd484a345fef42a7d2f9 /drivers/misc | |
| parent | 193bc2784bdfdbbf9535c98cfd0c6137f1b988f5 (diff) | |
msm: mdss: hdmi: hdcp2.2: use strict timeouts as per standard
Implement timers as per HDCP 2.2 standard for every message exchanged
with sink. The standard provides round trip timeout values for each
transaction. Use these timeout values and consider it as authentication
failure if timer expires.
Change-Id: I1fb647b70b8c3aafaeb6e91fd3f636d387247133
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/hdcp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/misc/hdcp.c b/drivers/misc/hdcp.c index 0a32d11f6161..0df388a841d6 100644 --- a/drivers/misc/hdcp.c +++ b/drivers/misc/hdcp.c @@ -332,6 +332,7 @@ struct hdcp_lib_handle { uint32_t msglen; uint32_t tz_ctxhandle; uint32_t hdcp_timeout; + uint32_t timeout_left; bool no_stored_km_flag; bool feature_supported; void *client_ctx; @@ -842,7 +843,11 @@ static int hdcp_lib_wakeup(struct hdcp_lib_wakeup_data *data) mutex_lock(&handle->wakeup_mutex); handle->wakeup_cmd = data->cmd; - pr_debug("%s\n", hdcp_lib_cmd_to_str(handle->wakeup_cmd)); + handle->timeout_left = data->timeout; + + pr_debug("%s, timeout left: %dms\n", + hdcp_lib_cmd_to_str(handle->wakeup_cmd), + handle->timeout_left); rc = hdcp_lib_check_valid_state(handle); if (rc) @@ -874,6 +879,8 @@ static int hdcp_lib_wakeup(struct hdcp_lib_wakeup_data *data) handle->no_stored_km_flag = 0; handle->repeater_flag = 0; handle->last_msg_sent = 0; + handle->hdcp_timeout = 0; + handle->timeout_left = 0; atomic_set(&handle->hdcp_off, 0); handle->hdcp_state = HDCP_STATE_INIT; @@ -949,7 +956,7 @@ static void hdcp_lib_msg_sent_work(struct kthread_work *work) break; default: cdata.cmd = HDMI_HDCP_WKUP_CMD_RECV_MESSAGE; - cdata.timeout = handle->hdcp_timeout; + cdata.timeout = handle->timeout_left; } mutex_unlock(&handle->hdcp_lock); |
