diff mbox

[v2,09/42] linux/mei: Header for mei_hdcp driver interface

Message ID 1520510349-8385-10-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ramalingam C March 8, 2018, 11:58 a.m. UTC
Data structures and Enum for the I915-MEI_HDCP interface are defined
at <linux/mei_hdcp.h>

v2:
  Rebased.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 include/linux/mei_hdcp.h | 71 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

Comments

Winkler, Tomas March 8, 2018, 1:13 p.m. UTC | #1
> Data structures and Enum for the I915-MEI_HDCP interface are defined at
> <linux/mei_hdcp.h>
> 
> v2:
>   Rebased.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  include/linux/mei_hdcp.h | 71
> ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 71 insertions(+)
> 
> diff --git a/include/linux/mei_hdcp.h b/include/linux/mei_hdcp.h index
> 774b26da0c26..9a869d1cbd5d 100644
> --- a/include/linux/mei_hdcp.h
> +++ b/include/linux/mei_hdcp.h
> @@ -23,6 +23,77 @@
>  #ifndef _LINUX_MEI_HDCP_H
>  #define _LINUX_MEI_HDCP_H
Missing license. 
> 
> +#include <linux/mei_cl_bus.h>
> +
> +/*
> + * Enumeration of the physical DDI available on the platform  */ enum
> +physical_port {

If this is public header you need a proper prefix for types. 

> +	INVALID_PORT = 0x00,	/* Not a valid port */
> +
> +	DDI_RANGE_BEGIN = 0x01,	/* Beginning of the valid DDI port
> range */
> +	DDI_B		= 0x01,		/* Port DDI B */
> +	DDI_C		= 0x02,		/* Port DDI C */
> +	DDI_D		= 0x03,		/* Port DDI D */
> +	DDI_E		= 0x04,		/* Port DDI E */
> +	DDI_F		= 0x05,		/* Port DDI F */
> +	DDI_A		= 0x07,		/* Port DDI A */
> +	DDI_RANGE_END	= DDI_A,/* End of the valid DDI port range */
> +};
> +
> +/* The types of HDCP 2.2 ports supported */ enum
> +hdcp_integrated_port_type {
> +	HDCP_INVALID_TYPE	= 0x00,
> +
> +	/* HDCP 2.x ports that are integrated into Intel HW */
> +	INTEGRATED		= 0x01,
> +
> +	/* HDCP2.2 discrete wired Tx port with LSPCON (HDMI 2.0) solution
> */
> +	LSPCON			= 0x02,
> +
> +	/* HDCP2.2 discrete wired Tx port using the CPDP (DP 1.3) solution */
> +	CPDP			= 0x03,
> +};
> +
> +/**
> + * wired_protocol: Supported integrated wired HDCP protocol.
> + * Based on this value, Minor differenceneeded between wired
> +specifications
> + * are handled.
> + */
> +enum hdcp_protocol {
> +	HDCP_PROTOCOL_INVALID,
> +	HDCP_PROTOCOL_HDMI,
> +	HDCP_PROTOCOL_DP
> +};
> +
> +/**
> + * mei_hdcp_data: Input data to the mei_hdcp APIs.
> + */
> +struct mei_hdcp_data {
> +	struct mei_cl_device *cldev;


Not why this device is here?

 +	enum physical_port port;
> +	enum hdcp_integrated_port_type port_type;
> +	enum hdcp_protocol protocol;
> +
> +	/*
> +	 * No of streams transmitted on a port.
> +	 * In case of HDMI & DP SST, single stream will be
> +	 * transmitted on a port.
> +	 */
> +	uint16_t k;
> +
> +	/*
> +	 * 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;
> +
> +	/* k(No of Streams per port) x structure of wired_streamid_type */
> +	struct hdcp2_streamid_type *streams;
> +};
> +
>  #ifdef CONFIG_INTEL_MEI_HDCP
>  int mei_hdcp_cldev_get_reference(void *client_data,
>  				 struct mei_cl_device **cldev,
> --
> 2.7.4
Ramalingam C March 12, 2018, 11:15 a.m. UTC | #2
On Thursday 08 March 2018 06:43 PM, Winkler, Tomas wrote:
>> Data structures and Enum for the I915-MEI_HDCP interface are defined at
>> <linux/mei_hdcp.h>
>>
>> v2:
>>    Rebased.
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> ---
>>   include/linux/mei_hdcp.h | 71
>> ++++++++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 71 insertions(+)
>>
>> diff --git a/include/linux/mei_hdcp.h b/include/linux/mei_hdcp.h index
>> 774b26da0c26..9a869d1cbd5d 100644
>> --- a/include/linux/mei_hdcp.h
>> +++ b/include/linux/mei_hdcp.h
>> @@ -23,6 +23,77 @@
>>   #ifndef _LINUX_MEI_HDCP_H
>>   #define _LINUX_MEI_HDCP_H
> Missing license.
Added in the [PATCH v2 07/42] misc/mei/hdcp: Get & Put for mei cl_device
And do we need dual licence for this generic header also?
>> +#include <linux/mei_cl_bus.h>
>> +
>> +/*
>> + * Enumeration of the physical DDI available on the platform  */ enum
>> +physical_port {
> If this is public header you need a proper prefix for types.
Ok I will add a prefix of HDCP_
>
>> +	INVALID_PORT = 0x00,	/* Not a valid port */
>> +
>> +	DDI_RANGE_BEGIN = 0x01,	/* Beginning of the valid DDI port
>> range */
>> +	DDI_B		= 0x01,		/* Port DDI B */
>> +	DDI_C		= 0x02,		/* Port DDI C */
>> +	DDI_D		= 0x03,		/* Port DDI D */
>> +	DDI_E		= 0x04,		/* Port DDI E */
>> +	DDI_F		= 0x05,		/* Port DDI F */
>> +	DDI_A		= 0x07,		/* Port DDI A */
>> +	DDI_RANGE_END	= DDI_A,/* End of the valid DDI port range */
>> +};
>> +
>> +/* The types of HDCP 2.2 ports supported */ enum
>> +hdcp_integrated_port_type {
>> +	HDCP_INVALID_TYPE	= 0x00,
>> +
>> +	/* HDCP 2.x ports that are integrated into Intel HW */
>> +	INTEGRATED		= 0x01,
>> +
>> +	/* HDCP2.2 discrete wired Tx port with LSPCON (HDMI 2.0) solution
>> */
>> +	LSPCON			= 0x02,
>> +
>> +	/* HDCP2.2 discrete wired Tx port using the CPDP (DP 1.3) solution */
>> +	CPDP			= 0x03,
>> +};
>> +
>> +/**
>> + * wired_protocol: Supported integrated wired HDCP protocol.
>> + * Based on this value, Minor differenceneeded between wired
>> +specifications
>> + * are handled.
>> + */
>> +enum hdcp_protocol {
>> +	HDCP_PROTOCOL_INVALID,
>> +	HDCP_PROTOCOL_HDMI,
>> +	HDCP_PROTOCOL_DP
>> +};
>> +
>> +/**
>> + * mei_hdcp_data: Input data to the mei_hdcp APIs.
>> + */
>> +struct mei_hdcp_data {
>> +	struct mei_cl_device *cldev;
>
> Not why this device is here?
I915 is passing the struct mei_hdcp_data as parameter for all requests. 
So the struct is populated withe the device handle also.
As per your review comment if the cldev needs to be explicit parameter 
then that can be removed from this struct.

--Ram
>
>   +	enum physical_port port;
>> +	enum hdcp_integrated_port_type port_type;
>> +	enum hdcp_protocol protocol;
>> +
>> +	/*
>> +	 * No of streams transmitted on a port.
>> +	 * In case of HDMI & DP SST, single stream will be
>> +	 * transmitted on a port.
>> +	 */
>> +	uint16_t k;
>> +
>> +	/*
>> +	 * 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;
>> +
>> +	/* k(No of Streams per port) x structure of wired_streamid_type */
>> +	struct hdcp2_streamid_type *streams;
>> +};
>> +
>>   #ifdef CONFIG_INTEL_MEI_HDCP
>>   int mei_hdcp_cldev_get_reference(void *client_data,
>>   				 struct mei_cl_device **cldev,
>> --
>> 2.7.4
diff mbox

Patch

diff --git a/include/linux/mei_hdcp.h b/include/linux/mei_hdcp.h
index 774b26da0c26..9a869d1cbd5d 100644
--- a/include/linux/mei_hdcp.h
+++ b/include/linux/mei_hdcp.h
@@ -23,6 +23,77 @@ 
 #ifndef _LINUX_MEI_HDCP_H
 #define _LINUX_MEI_HDCP_H
 
+#include <linux/mei_cl_bus.h>
+
+/*
+ * Enumeration of the physical DDI available on the platform
+ */
+enum physical_port {
+	INVALID_PORT = 0x00,	/* Not a valid port */
+
+	DDI_RANGE_BEGIN = 0x01,	/* Beginning of the valid DDI port range */
+	DDI_B		= 0x01,		/* Port DDI B */
+	DDI_C		= 0x02,		/* Port DDI C */
+	DDI_D		= 0x03,		/* Port DDI D */
+	DDI_E		= 0x04,		/* Port DDI E */
+	DDI_F		= 0x05,		/* Port DDI F */
+	DDI_A		= 0x07,		/* Port DDI A */
+	DDI_RANGE_END	= DDI_A,/* End of the valid DDI port range */
+};
+
+/* The types of HDCP 2.2 ports supported */
+enum hdcp_integrated_port_type {
+	HDCP_INVALID_TYPE	= 0x00,
+
+	/* HDCP 2.x ports that are integrated into Intel HW */
+	INTEGRATED		= 0x01,
+
+	/* HDCP2.2 discrete wired Tx port with LSPCON (HDMI 2.0) solution */
+	LSPCON			= 0x02,
+
+	/* HDCP2.2 discrete wired Tx port using the CPDP (DP 1.3) solution */
+	CPDP			= 0x03,
+};
+
+/**
+ * wired_protocol: Supported integrated wired HDCP protocol.
+ * Based on this value, Minor differenceneeded between wired specifications
+ * are handled.
+ */
+enum hdcp_protocol {
+	HDCP_PROTOCOL_INVALID,
+	HDCP_PROTOCOL_HDMI,
+	HDCP_PROTOCOL_DP
+};
+
+/**
+ * mei_hdcp_data: Input data to the mei_hdcp APIs.
+ */
+struct mei_hdcp_data {
+	struct mei_cl_device *cldev;
+	enum physical_port port;
+	enum hdcp_integrated_port_type port_type;
+	enum hdcp_protocol protocol;
+
+	/*
+	 * No of streams transmitted on a port.
+	 * In case of HDMI & DP SST, single stream will be
+	 * transmitted on a port.
+	 */
+	uint16_t k;
+
+	/*
+	 * 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;
+
+	/* k(No of Streams per port) x structure of wired_streamid_type */
+	struct hdcp2_streamid_type *streams;
+};
+
 #ifdef CONFIG_INTEL_MEI_HDCP
 int mei_hdcp_cldev_get_reference(void *client_data,
 				 struct mei_cl_device **cldev,