Re: [Intel-gfx] [PATCH v3 20/40] drm/i915: Define HDCP2.2 related variables

2018-05-09 Thread Shankar, Uma


>-Original Message-
>From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of
>Ramalingam C
>Sent: Tuesday, April 3, 2018 7:28 PM
>To: intel-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org;
>seanp...@chromium.org; dan...@ffwll.ch; ch...@chris-wilson.co.uk;
>jani.nik...@linux.intel.com; Winkler, Tomas ;
>Usyskin, Alexander 
>Cc: Vivi, Rodrigo 
>Subject: [PATCH v3 20/40] drm/i915: Define HDCP2.2 related variables
>
>For upcoming implementation of HDCP2.2 in I915, important variable required for
>HDCP2.2 are defined.
>
>HDCP_shim is extended to support encoder specific HDCP2.2 flows.
>
>v2:
>  1.4 shim is extended to support hdcp2.2. [Sean Paul]
>  platform's/panel's hdcp ver capability is removed. [Sean Paul]
>  mei references in i915_private are moved to later patches. [Chris Wilson]
>v3:
>  mei_cl_device ref is moved into intel_hdcp
>
>Signed-off-by: Ramalingam C 
>---
> drivers/gpu/drm/i915/intel_drv.h | 61
>
> 1 file changed, 61 insertions(+)
>
>diff --git a/drivers/gpu/drm/i915/intel_drv.h 
>b/drivers/gpu/drm/i915/intel_drv.h
>index fdffcb833cd2..ca06d9a158f6 100644
>--- a/drivers/gpu/drm/i915/intel_drv.h
>+++ b/drivers/gpu/drm/i915/intel_drv.h
>@@ -29,6 +29,7 @@
> #include 
> #include 
> #include 
>+#include 
> #include 
> #include "i915_drv.h"
> #include 
>@@ -375,6 +376,32 @@ struct intel_hdcp_shim {
>   /* Detects panel's hdcp capability. This is optional for HDMI. */
>   int (*hdcp_capable)(struct intel_digital_port *intel_dig_port,
>   bool *hdcp_capable);
>+
>+  /* Write HDCP2.2 messages */
>+  int (*write_2_2_msg)(struct intel_digital_port *intel_dig_port,
>+   void *buf, size_t size);
>+
>+  /* Read HDCP2.2 messages */
>+  int (*read_2_2_msg)(struct intel_digital_port *intel_dig_port,
>+  uint8_t msg_id, void *buf, size_t size);
>+
>+  /*
>+   * Implementation of DP HDCP2.2 Errata for the communication of
>stream
>+   * type to Receivers. In DP HDCP2.2 Stream type is one of the input to
>+   * the HDCP2.2 Chiper for En/De-Cryption. Not applicable for HDMI.
>+   */
>+  int (*config_stream_type)(struct intel_digital_port *intel_dig_port,
>+void *buf, size_t size);
>+
>+  /* HDCP2.2 Link Integrity Check */
>+  int (*check_2_2_link)(struct intel_digital_port *intel_dig_port);
>+
>+  /* Detects whether Panel is HDCP2.2 capable */
>+  int (*hdcp_2_2_capable)(struct intel_digital_port *intel_dig_port,
>+  bool *capable);
>+
>+  /* Detects the HDCP protocol(DP/HDMI) required on the port */
>+  enum hdcp_protocol (*hdcp_protocol)(void);
> };
>
> struct intel_hdcp {
>@@ -383,6 +410,40 @@ struct intel_hdcp {
>   uint64_t hdcp_value; /* protected by hdcp_mutex */
>   struct delayed_work hdcp_check_work;
>   struct work_struct hdcp_prop_work;
>+
>+  /** HDCP2.2 related definitions **/

Drop extra *.

>+  bool hdcp2_supported;
>+
>+  /*
>+   * Content Stream Type defined by content owner. TYPE0(0x0) content
>can
>+   * flow in the link protected by HDCP2.2 or HDCP1.4, where as
>TYPE1(0x1)
>+   * content can flow only through a link protected by HDCP2.2.
>+   */
>+  u8 content_type;
>+
>+  bool is_paired;
>+  bool is_repeater;
>+
>+  /*
>+   * Count of ReceiverID_List received. Initialized to 0 at AKE_INIT.
>+   * Incremented after processing the RepeaterAuth_Send_ReceiverID_List.
>+   * When it rolls over re-auth has to be triggered.
>+   */
>+  uint32_t seq_num_v;
>+
>+  /*
>+   * Count of RepeaterAuth_Stream_Manage msg propagated.
>+   * Initialized to 0 on AKE_INIT. Incremented after every successful
>+   * transmission of RepeaterAuth_Stream_Manage message. When it rolls
>+   * over re-Auth has to be triggered.
>+   */
>+  uint32_t seq_num_m;
>+
>+  /* mei interface related information */
>+  struct mei_cl_device *cldev;
>+  struct mei_hdcp_data mei_data;
>+
>+  struct delayed_work hdcp2_check_work;
> };
>
> struct intel_connector {
>--
>2.7.4
>
>___
>dri-devel mailing list
>dri-de...@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v3 20/40] drm/i915: Define HDCP2.2 related variables

2018-04-03 Thread kbuild test robot
Hi Ramalingam,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20180403]
[cannot apply to v4.16]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Ramalingam-C/drm-i915-Implement-HDCP2-2/20180404-031743
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x001-201813 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from drivers/gpu//drm/i915/intel_drv.h:32:0,
from drivers/gpu//drm/i915/i915_trace.h:11,
from drivers/gpu//drm/i915/i915_drv.h:2919,
from drivers/gpu//drm/i915/i915_drv.c:49:
>> include/linux/mei_hdcp.h:148:12: error: 'mei_cldev_unregister_notify' 
>> defined but not used [-Werror=unused-function]
static int mei_cldev_unregister_notify(struct notifier_block *nb)
   ^~~
>> include/linux/mei_hdcp.h:144:12: error: 'mei_cldev_register_notify' defined 
>> but not used [-Werror=unused-function]
static int mei_cldev_register_notify(struct notifier_block *nb)
   ^
   cc1: all warnings being treated as errors

vim +/mei_cldev_unregister_notify +148 include/linux/mei_hdcp.h

3ce9e24eb Ramalingam C 2018-04-03  105  
ca998fc38 Ramalingam C 2018-04-03  106  #ifdef CONFIG_INTEL_MEI_HDCP
ca998fc38 Ramalingam C 2018-04-03  107  int mei_cldev_register_notify(struct 
notifier_block *nb);
ca998fc38 Ramalingam C 2018-04-03  108  int mei_cldev_unregister_notify(struct 
notifier_block *nb);
5240fee41 Ramalingam C 2018-04-03  109  int mei_initiate_hdcp2_session(struct 
mei_cl_device *cldev,
5240fee41 Ramalingam C 2018-04-03  110 struct 
mei_hdcp_data *data,
5240fee41 Ramalingam C 2018-04-03  111 struct 
hdcp2_ake_init *ake_data);
e33886f53 Ramalingam C 2018-04-03  112  int
e33886f53 Ramalingam C 2018-04-03  113  
mei_verify_receiver_cert_prepare_km(struct mei_cl_device *cldev,
e33886f53 Ramalingam C 2018-04-03  114  
struct mei_hdcp_data *data,
e33886f53 Ramalingam C 2018-04-03  115  
struct hdcp2_ake_send_cert *rx_cert,
e33886f53 Ramalingam C 2018-04-03  116  
bool *km_stored,
e33886f53 Ramalingam C 2018-04-03  117  
struct hdcp2_ake_no_stored_km *ek_pub_km,
e33886f53 Ramalingam C 2018-04-03  118  
size_t *msg_sz);
a27b68fb5 Ramalingam C 2018-04-03  119  int mei_verify_hprime(struct 
mei_cl_device *cldev, struct mei_hdcp_data *data,
a27b68fb5 Ramalingam C 2018-04-03  120struct 
hdcp2_ake_send_hprime *rx_hprime);
dc86bde43 Ramalingam C 2018-04-03  121  int mei_store_pairing_info(struct 
mei_cl_device *cldev,
dc86bde43 Ramalingam C 2018-04-03  122 struct 
mei_hdcp_data *data,
dc86bde43 Ramalingam C 2018-04-03  123 struct 
hdcp2_ake_send_pairing_info *pairing_info);
67158470b Ramalingam C 2018-04-03  124  int mei_initiate_locality_check(struct 
mei_cl_device *cldev,
67158470b Ramalingam C 2018-04-03  125  struct 
mei_hdcp_data *data,
67158470b Ramalingam C 2018-04-03  126  struct 
hdcp2_lc_init *lc_init_data);
b10099c9a Ramalingam C 2018-04-03  127  int mei_verify_lprime(struct 
mei_cl_device *cldev, struct mei_hdcp_data *data,
b10099c9a Ramalingam C 2018-04-03  128struct 
hdcp2_lc_send_lprime *rx_lprime);
931c35709 Ramalingam C 2018-04-03  129  int mei_get_session_key(struct 
mei_cl_device *cldev, struct mei_hdcp_data *data,
931c35709 Ramalingam C 2018-04-03  130  struct 
hdcp2_ske_send_eks *ske_data);
654828e8b Ramalingam C 2018-04-03  131  int
654828e8b Ramalingam C 2018-04-03  132  
mei_repeater_check_flow_prepare_ack(struct mei_cl_device *cldev,
654828e8b Ramalingam C 2018-04-03  133  
struct mei_hdcp_data *data,
654828e8b Ramalingam C 2018-04-03  134  
struct hdcp2_rep_send_receiverid_list
654828e8b Ramalingam C 2018-04-03  135  
*rep_topology,
654828e8b Ramalingam C 2018-04-03  136  
struct hdcp2_rep_send_ack *rep_send_ack);
315c37225 Ramalingam C 2018-04-03  137  int mei_verify_mprime(struct 
mei_cl_device *cldev, struct mei_hdcp_data *data,
315c37225 Ramalingam C 2018-04-03  138struct 
hdcp2_rep_stream_ready *stream_ready);
702a0ad13 Ramalingam C 2018-04-03  139  int 
mei_enable_

[Intel-gfx] [PATCH v3 20/40] drm/i915: Define HDCP2.2 related variables

2018-04-03 Thread Ramalingam C
For upcoming implementation of HDCP2.2 in I915, important variable
required for HDCP2.2 are defined.

HDCP_shim is extended to support encoder specific HDCP2.2 flows.

v2:
  1.4 shim is extended to support hdcp2.2. [Sean Paul]
  platform's/panel's hdcp ver capability is removed. [Sean Paul]
  mei references in i915_private are moved to later patches. [Chris Wilson]
v3:
  mei_cl_device ref is moved into intel_hdcp

Signed-off-by: Ramalingam C 
---
 drivers/gpu/drm/i915/intel_drv.h | 61 
 1 file changed, 61 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index fdffcb833cd2..ca06d9a158f6 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "i915_drv.h"
 #include 
@@ -375,6 +376,32 @@ struct intel_hdcp_shim {
/* Detects panel's hdcp capability. This is optional for HDMI. */
int (*hdcp_capable)(struct intel_digital_port *intel_dig_port,
bool *hdcp_capable);
+
+   /* Write HDCP2.2 messages */
+   int (*write_2_2_msg)(struct intel_digital_port *intel_dig_port,
+void *buf, size_t size);
+
+   /* Read HDCP2.2 messages */
+   int (*read_2_2_msg)(struct intel_digital_port *intel_dig_port,
+   uint8_t msg_id, void *buf, size_t size);
+
+   /*
+* Implementation of DP HDCP2.2 Errata for the communication of stream
+* type to Receivers. In DP HDCP2.2 Stream type is one of the input to
+* the HDCP2.2 Chiper for En/De-Cryption. Not applicable for HDMI.
+*/
+   int (*config_stream_type)(struct intel_digital_port *intel_dig_port,
+ void *buf, size_t size);
+
+   /* HDCP2.2 Link Integrity Check */
+   int (*check_2_2_link)(struct intel_digital_port *intel_dig_port);
+
+   /* Detects whether Panel is HDCP2.2 capable */
+   int (*hdcp_2_2_capable)(struct intel_digital_port *intel_dig_port,
+   bool *capable);
+
+   /* Detects the HDCP protocol(DP/HDMI) required on the port */
+   enum hdcp_protocol (*hdcp_protocol)(void);
 };
 
 struct intel_hdcp {
@@ -383,6 +410,40 @@ struct intel_hdcp {
uint64_t hdcp_value; /* protected by hdcp_mutex */
struct delayed_work hdcp_check_work;
struct work_struct hdcp_prop_work;
+
+   /** HDCP2.2 related definitions **/
+   bool hdcp2_supported;
+
+   /*
+* Content Stream Type defined by content owner. TYPE0(0x0) content can
+* flow in the link protected by HDCP2.2 or HDCP1.4, where as TYPE1(0x1)
+* content can flow only through a link protected by HDCP2.2.
+*/
+   u8 content_type;
+
+   bool is_paired;
+   bool is_repeater;
+
+   /*
+* Count of ReceiverID_List received. Initialized to 0 at AKE_INIT.
+* Incremented after processing the RepeaterAuth_Send_ReceiverID_List.
+* When it rolls over re-auth has to be triggered.
+*/
+   uint32_t seq_num_v;
+
+   /*
+* Count of RepeaterAuth_Stream_Manage msg propagated.
+* Initialized to 0 on AKE_INIT. Incremented after every successful
+* transmission of RepeaterAuth_Stream_Manage message. When it rolls
+* over re-Auth has to be triggered.
+*/
+   uint32_t seq_num_m;
+
+   /* mei interface related information */
+   struct mei_cl_device *cldev;
+   struct mei_hdcp_data mei_data;
+
+   struct delayed_work hdcp2_check_work;
 };
 
 struct intel_connector {
-- 
2.7.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx