summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorTatenda Chipeperekwa <tatendac@codeaurora.org>2015-09-25 17:00:00 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:46:07 -0700
commitc76b5e3acf68a4e0711a2ad0f5c826ae46530cbf (patch)
treec424d65c86bf8b63d3cc06c40442c707b05f5527 /drivers/misc
parentcc97a775f4f367e920ebcb6398389ff44279c67a (diff)
msm: mdss: hdmi: check if hdcp2p2 app is present during hpd
Check if the hdcp2p2 app is present every time the hdmi cable is connected. If the app is not present, then we consider hdcp-2.2 as not supported on the target. This scenario occurs on devices that are not hdcp-2.2 provisioned, and with this change hdmi core continues in non-encrypted mode. Change-Id: I72ebcc1e6844f46dbbc974efb6ba926948e1bbde Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/hdcp.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/misc/hdcp.c b/drivers/misc/hdcp.c
index 7054e74654fe..e42d4fb5587e 100644
--- a/drivers/misc/hdcp.c
+++ b/drivers/misc/hdcp.c
@@ -863,6 +863,27 @@ exit:
return rc;
}
+static bool hdcp2p2_client_feature_supported(void *phdcpcontext)
+{
+ int rc = 0;
+ bool supported = false;
+ struct hdcp2p2_handle *handle = phdcpcontext;
+
+ if (!handle) {
+ pr_err("invalid input\n");
+ goto end;
+ }
+
+ rc = hdcp2p2_library_load(handle);
+ if (!rc) {
+ pr_debug("HDCP2p2 supported\n");
+ hdcp2p2_library_unload(handle);
+ supported = true;
+ }
+end:
+ return supported;
+}
+
static int hdcp2p2_client_start(void *phdcpcontext)
{
int rc = 0;
@@ -1135,6 +1156,7 @@ int hdcp_library_register(void **pphdcpcontext,
/* populate ops to be called by client */
txmtr_ops->start = hdcp2p2_client_start;
txmtr_ops->stop = hdcp2p2_client_stop;
+ txmtr_ops->feature_supported = hdcp2p2_client_feature_supported;
txmtr_ops->process_message = hdcp2p2_txmtr_process_message;
txmtr_ops->hdcp_txmtr_query_stream_type =
hdcp2p2_txmtr_query_stream_type;
@@ -1166,7 +1188,8 @@ int hdcp_library_register(void **pphdcpcontext,
}
*((struct hdcp2p2_handle **)pphdcpcontext) = handle;
- pr_debug("hdcp lib successfully initialized\n");
+
+ pr_debug("hdcp lib successfully registered\n");
return 0;
error:
@@ -1196,6 +1219,8 @@ void hdcp_library_deregister(void *phdcpcontext)
if (handle->hdcp_workqueue)
destroy_workqueue(handle->hdcp_workqueue);
+ mutex_destroy(&handle->hdcp_lock);
+
kzfree(handle->listener_buf);
kzfree(handle);
}