[v9,3/6] drm: Extend I915 mei interface for transcoder info
diff mbox series

Message ID 20190822151904.17919-4-ramalingam.c@intel.com
State New
Headers show
Series
  • drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+
Related show

Commit Message

Ramalingam C Aug. 22, 2019, 3:19 p.m. UTC
I915 needs to send the index of the transcoder as per ME FW.
To support this, define enum mei_fw_ddi and add as a member into
the struct hdcp_port_data.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
---
 include/drm/i915_mei_hdcp_interface.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Sharma, Shashank Aug. 27, 2019, 4:48 a.m. UTC | #1
On 8/22/2019 8:49 PM, Ramalingam C wrote:
> I915 needs to send the index of the transcoder as per ME FW.
> To support this, define enum mei_fw_ddi and add as a member into
> the struct hdcp_port_data.

The commit message says you are defining enum mei_fw_ddi, but you are 
actually defining enum mei_fw_tc;

- Shashank

> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> ---
>   include/drm/i915_mei_hdcp_interface.h | 13 +++++++++++++
>   1 file changed, 13 insertions(+)
>
> diff --git a/include/drm/i915_mei_hdcp_interface.h b/include/drm/i915_mei_hdcp_interface.h
> index a97acf1c9710..0de629bf2f62 100644
> --- a/include/drm/i915_mei_hdcp_interface.h
> +++ b/include/drm/i915_mei_hdcp_interface.h
> @@ -54,9 +54,21 @@ enum mei_fw_ddi {
>   	MEI_DDI_RANGE_END = MEI_DDI_A,
>   };
>   
> +enum mei_fw_tc {
> +	MEI_INVALID_TRANSCODER = 0x00,	/* Invalid transcoder type */
> +	MEI_TC_EDP,			/* Transcoder for eDP */
> +	MEI_TC_DSI0,			/* Transcoder for DSI0 */
> +	MEI_TC_DSI1,			/* Transcoder for DSI1 */
> +	MEI_TC_A = 0x10,		/* Transcoder TCA */
> +	MEI_TC_B,			/* Transcoder TCB */
> +	MEI_TC_C,			/* Transcoder TCC */
> +	MEI_TC_D			/* Transcoder TCD */
> +};
> +
>   /**
>    * struct hdcp_port_data - intel specific HDCP port data
>    * @fw_ddi: ddi index as per ME FW
> + * @fw_tc: transcoder index as per ME FW
>    * @port_type: HDCP port type as per ME FW classification
>    * @protocol: HDCP adaptation as per ME FW
>    * @k: No of streams transmitted on a port. Only on DP MST this is != 1
> @@ -69,6 +81,7 @@ enum mei_fw_ddi {
>    */
>   struct hdcp_port_data {
>   	enum mei_fw_ddi fw_ddi;
> +	enum mei_fw_tc fw_tc;
>   	u8 port_type;
>   	u8 protocol;
>   	u16 k;
Sharma, Shashank Aug. 27, 2019, 5:06 a.m. UTC | #2
On 8/22/2019 8:49 PM, Ramalingam C wrote:
> I915 needs to send the index of the transcoder as per ME FW.
> To support this, define enum mei_fw_ddi and add as a member into
> the struct hdcp_port_data.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> ---
>   include/drm/i915_mei_hdcp_interface.h | 13 +++++++++++++
>   1 file changed, 13 insertions(+)
>
> diff --git a/include/drm/i915_mei_hdcp_interface.h b/include/drm/i915_mei_hdcp_interface.h
> index a97acf1c9710..0de629bf2f62 100644
> --- a/include/drm/i915_mei_hdcp_interface.h
> +++ b/include/drm/i915_mei_hdcp_interface.h
> @@ -54,9 +54,21 @@ enum mei_fw_ddi {
>   	MEI_DDI_RANGE_END = MEI_DDI_A,
>   };
>   
> +enum mei_fw_tc {
> +	MEI_INVALID_TRANSCODER = 0x00,	/* Invalid transcoder type */
> +	MEI_TC_EDP,			/* Transcoder for eDP */
> +	MEI_TC_DSI0,			/* Transcoder for DSI0 */
> +	MEI_TC_DSI1,			/* Transcoder for DSI1 */
Also, this is a bit odd, coz ports above can't do HDCP, so it doesn't 
make sense to have them here. But seems like we want to be in sync with 
MEI FW definitions, so we should change the function

intel_get_mei_fw_ddi_index to accept only from ports A to D, not above 
or below.

- Shashank

> +	MEI_TC_A = 0x10,		/* Transcoder TCA */
> +	MEI_TC_B,			/* Transcoder TCB */
> +	MEI_TC_C,			/* Transcoder TCC */
> +	MEI_TC_D			/* Transcoder TCD */
> +};
> +
>   /**
>    * struct hdcp_port_data - intel specific HDCP port data
>    * @fw_ddi: ddi index as per ME FW
> + * @fw_tc: transcoder index as per ME FW
>    * @port_type: HDCP port type as per ME FW classification
>    * @protocol: HDCP adaptation as per ME FW
>    * @k: No of streams transmitted on a port. Only on DP MST this is != 1
> @@ -69,6 +81,7 @@ enum mei_fw_ddi {
>    */
>   struct hdcp_port_data {
>   	enum mei_fw_ddi fw_ddi;
> +	enum mei_fw_tc fw_tc;
>   	u8 port_type;
>   	u8 protocol;
>   	u16 k;
Ramalingam C Aug. 27, 2019, 5:19 a.m. UTC | #3
On 2019-08-27 at 10:18:07 +0530, Sharma, Shashank wrote:
> 
> On 8/22/2019 8:49 PM, Ramalingam C wrote:
> > I915 needs to send the index of the transcoder as per ME FW.
> > To support this, define enum mei_fw_ddi and add as a member into
> > the struct hdcp_port_data.
> 
> The commit message says you are defining enum mei_fw_ddi, but you are
> actually defining enum mei_fw_tc;
dangerous typo :) I will fix it. Thanks

-Ram
> 
> - Shashank
> 
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > Acked-by: Jani Nikula <jani.nikula@intel.com>
> > ---
> >   include/drm/i915_mei_hdcp_interface.h | 13 +++++++++++++
> >   1 file changed, 13 insertions(+)
> > 
> > diff --git a/include/drm/i915_mei_hdcp_interface.h b/include/drm/i915_mei_hdcp_interface.h
> > index a97acf1c9710..0de629bf2f62 100644
> > --- a/include/drm/i915_mei_hdcp_interface.h
> > +++ b/include/drm/i915_mei_hdcp_interface.h
> > @@ -54,9 +54,21 @@ enum mei_fw_ddi {
> >   	MEI_DDI_RANGE_END = MEI_DDI_A,
> >   };
> > +enum mei_fw_tc {
> > +	MEI_INVALID_TRANSCODER = 0x00,	/* Invalid transcoder type */
> > +	MEI_TC_EDP,			/* Transcoder for eDP */
> > +	MEI_TC_DSI0,			/* Transcoder for DSI0 */
> > +	MEI_TC_DSI1,			/* Transcoder for DSI1 */
> > +	MEI_TC_A = 0x10,		/* Transcoder TCA */
> > +	MEI_TC_B,			/* Transcoder TCB */
> > +	MEI_TC_C,			/* Transcoder TCC */
> > +	MEI_TC_D			/* Transcoder TCD */
> > +};
> > +
> >   /**
> >    * struct hdcp_port_data - intel specific HDCP port data
> >    * @fw_ddi: ddi index as per ME FW
> > + * @fw_tc: transcoder index as per ME FW
> >    * @port_type: HDCP port type as per ME FW classification
> >    * @protocol: HDCP adaptation as per ME FW
> >    * @k: No of streams transmitted on a port. Only on DP MST this is != 1
> > @@ -69,6 +81,7 @@ enum mei_fw_ddi {
> >    */
> >   struct hdcp_port_data {
> >   	enum mei_fw_ddi fw_ddi;
> > +	enum mei_fw_tc fw_tc;
> >   	u8 port_type;
> >   	u8 protocol;
> >   	u16 k;
Ramalingam C Aug. 27, 2019, 5:21 a.m. UTC | #4
On 2019-08-27 at 10:36:11 +0530, Sharma, Shashank wrote:
> 
> On 8/22/2019 8:49 PM, Ramalingam C wrote:
> > I915 needs to send the index of the transcoder as per ME FW.
> > To support this, define enum mei_fw_ddi and add as a member into
> > the struct hdcp_port_data.
> > 
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > Acked-by: Jani Nikula <jani.nikula@intel.com>
> > ---
> >   include/drm/i915_mei_hdcp_interface.h | 13 +++++++++++++
> >   1 file changed, 13 insertions(+)
> > 
> > diff --git a/include/drm/i915_mei_hdcp_interface.h b/include/drm/i915_mei_hdcp_interface.h
> > index a97acf1c9710..0de629bf2f62 100644
> > --- a/include/drm/i915_mei_hdcp_interface.h
> > +++ b/include/drm/i915_mei_hdcp_interface.h
> > @@ -54,9 +54,21 @@ enum mei_fw_ddi {
> >   	MEI_DDI_RANGE_END = MEI_DDI_A,
> >   };
> > +enum mei_fw_tc {
> > +	MEI_INVALID_TRANSCODER = 0x00,	/* Invalid transcoder type */
> > +	MEI_TC_EDP,			/* Transcoder for eDP */
> > +	MEI_TC_DSI0,			/* Transcoder for DSI0 */
> > +	MEI_TC_DSI1,			/* Transcoder for DSI1 */
> Also, this is a bit odd, coz ports above can't do HDCP, so it doesn't make
> sense to have them here. But seems like we want to be in sync with MEI FW
> definitions, so we should change the function
> 
> intel_get_mei_fw_ddi_index to accept only from ports A to D, not above or
> below.
As we(I915) support HDCP on HDMI and DP only we will have TCA to TCD
only. Sure we can fix the intel_get_mei_fw_ddi_index to fill invalid TC
on other transcoders.

-Ram
> 
> - Shashank
> 
> > +	MEI_TC_A = 0x10,		/* Transcoder TCA */
> > +	MEI_TC_B,			/* Transcoder TCB */
> > +	MEI_TC_C,			/* Transcoder TCC */
> > +	MEI_TC_D			/* Transcoder TCD */
> > +};
> > +
> >   /**
> >    * struct hdcp_port_data - intel specific HDCP port data
> >    * @fw_ddi: ddi index as per ME FW
> > + * @fw_tc: transcoder index as per ME FW
> >    * @port_type: HDCP port type as per ME FW classification
> >    * @protocol: HDCP adaptation as per ME FW
> >    * @k: No of streams transmitted on a port. Only on DP MST this is != 1
> > @@ -69,6 +81,7 @@ enum mei_fw_ddi {
> >    */
> >   struct hdcp_port_data {
> >   	enum mei_fw_ddi fw_ddi;
> > +	enum mei_fw_tc fw_tc;
> >   	u8 port_type;
> >   	u8 protocol;
> >   	u16 k;

Patch
diff mbox series

diff --git a/include/drm/i915_mei_hdcp_interface.h b/include/drm/i915_mei_hdcp_interface.h
index a97acf1c9710..0de629bf2f62 100644
--- a/include/drm/i915_mei_hdcp_interface.h
+++ b/include/drm/i915_mei_hdcp_interface.h
@@ -54,9 +54,21 @@  enum mei_fw_ddi {
 	MEI_DDI_RANGE_END = MEI_DDI_A,
 };
 
+enum mei_fw_tc {
+	MEI_INVALID_TRANSCODER = 0x00,	/* Invalid transcoder type */
+	MEI_TC_EDP,			/* Transcoder for eDP */
+	MEI_TC_DSI0,			/* Transcoder for DSI0 */
+	MEI_TC_DSI1,			/* Transcoder for DSI1 */
+	MEI_TC_A = 0x10,		/* Transcoder TCA */
+	MEI_TC_B,			/* Transcoder TCB */
+	MEI_TC_C,			/* Transcoder TCC */
+	MEI_TC_D			/* Transcoder TCD */
+};
+
 /**
  * struct hdcp_port_data - intel specific HDCP port data
  * @fw_ddi: ddi index as per ME FW
+ * @fw_tc: transcoder index as per ME FW
  * @port_type: HDCP port type as per ME FW classification
  * @protocol: HDCP adaptation as per ME FW
  * @k: No of streams transmitted on a port. Only on DP MST this is != 1
@@ -69,6 +81,7 @@  enum mei_fw_ddi {
  */
 struct hdcp_port_data {
 	enum mei_fw_ddi fw_ddi;
+	enum mei_fw_tc fw_tc;
 	u8 port_type;
 	u8 protocol;
 	u16 k;