OSDN Git Service

msm: misc: hdcp: add hdcp support for display port
authorShivaprasad Hongal <shongal@codeaurora.org>
Wed, 8 Jun 2016 02:05:19 +0000 (19:05 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 26 Jul 2016 18:58:58 +0000 (11:58 -0700)
hdcp_library_register API now accepts device type.
Based on the device type passed, hdcp driver would
open the corresponding device session in trusted application.

CRs-Fixed: 1027136
Change-Id: Ia1a72138967a3806253f8431b36af71eaabe816d
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
drivers/misc/hdcp.c
drivers/video/fbdev/msm/mdss_hdmi_hdcp2p2.c
include/linux/hdcp_qseecom.h

index 7d1b9e9..0c6f1de 100644 (file)
@@ -456,6 +456,7 @@ struct hdcp_lib_handle {
        atomic_t hdcp_off;
        uint32_t session_id;
        bool legacy_app;
+       enum hdcp_device_type device_type;
 
        struct task_struct *thread;
        struct completion topo_wait;
@@ -901,7 +902,7 @@ static int hdcp_lib_session_init(struct hdcp_lib_handle *handle)
        req_buf =
            (struct hdcp_lib_session_init_req *)handle->qseecom_handle->sbuf;
        req_buf->commandid = HDCP_SESSION_INIT;
-       req_buf->deviceid = HDCP_TXMTR_HDMI;
+       req_buf->deviceid = handle->device_type;
        rsp_buf = (struct hdcp_lib_session_init_rsp *)
            (handle->qseecom_handle->sbuf +
             QSEECOM_ALIGN(sizeof(struct hdcp_lib_session_init_req)));
@@ -2060,6 +2061,7 @@ int hdcp_library_register(struct hdcp_register_data *data)
        handle->tethered = data->tethered;
        handle->hdcp_app_init = NULL;
        handle->hdcp_txmtr_init = NULL;
+       handle->device_type = data->device_type;
 
        pr_debug("tethered %d\n", handle->tethered);
 
index fb59d0b..9ce47cc 100644 (file)
@@ -1041,6 +1041,7 @@ void *hdmi_hdcp2p2_init(struct hdmi_hdcp_init_data *init_data)
        register_data.hdcp_ctx = &ctrl->lib_ctx;
        register_data.client_ops = &client_ops;
        register_data.txmtr_ops = &txmtr_ops;
+       register_data.device_type = HDCP_TXMTR_HDMI;
        register_data.client_ctx = ctrl;
        register_data.tethered = ctrl->tethered;
 
index d983519..26e9770 100644 (file)
@@ -108,9 +108,15 @@ struct hdcp_client_ops {
        int (*wakeup)(struct hdmi_hdcp_wakeup_data *data);
 };
 
+enum hdcp_device_type {
+       HDCP_TXMTR_HDMI = 0x8001,
+       HDCP_TXMTR_DP = 0x8002
+};
+
 struct hdcp_register_data {
        struct hdcp_client_ops *client_ops;
        struct hdcp_txmtr_ops *txmtr_ops;
+       enum hdcp_device_type device_type;
        void *client_ctx;
        void **hdcp_ctx;
        bool tethered;