All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v6 2/3] misc/mei_hdcp: Adding the transcoder detail in payload input
Date: Tue, 20 Aug 2019 15:50:10 +0530	[thread overview]
Message-ID: <20190820102010.GB7668@intel.com> (raw)
In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9DC9FFDC@hasmsx108.ger.corp.intel.com>

On 2019-08-20 at 14:15:47 +0530, Winkler, Tomas wrote:
> 
> > 
> > ME FW takes the transcoder details for Gen12+ platforms, as HDCP HW block is
> > moved to transcoders.
> > 
> > hdcp_port_data is extended with enum transcoder. Payload structure is
> > modified and populated from the hdcp_port_data.
> > 
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > ---
> >  drivers/misc/mei/hdcp/mei_hdcp.c      | 27 +++++++++++++++++++++++++++
> >  drivers/misc/mei/hdcp/mei_hdcp.h      | 15 ++++++++++++++-
> >  include/drm/i915_mei_hdcp_interface.h |  2 ++
> >  3 files changed, 43 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c
> > b/drivers/misc/mei/hdcp/mei_hdcp.c
> > index c681f6fab342..7efe3b65a986 100644
> > --- a/drivers/misc/mei/hdcp/mei_hdcp.c
> > +++ b/drivers/misc/mei/hdcp/mei_hdcp.c
> > @@ -39,6 +39,22 @@ static inline u8 mei_get_ddi_index(enum port port)
> >  	}
> >  }
> > 
> > +static inline u8 mei_get_tc_type(enum transcoder tc) {
> > +	switch (tc) {
> > +	case TRANSCODER_A ... TRANSCODER_D:
> > +		return (u8)(tc | 0x10);
> > +	case TRANSCODER_EDP:
> > +		return TC_EDP;
> > +	case TRANSCODER_DSI_0:
> > +		return TC_DSI0;
> > +	case TRANSCODER_DSI_1:
> > +		return TC_DSI1;
> > +	default:
> > +		return MEI_INVALID_TRANSCODER;
> > +	}
> > +}
> > +
> >  /**
> >   * mei_hdcp_initiate_session() - Initiate a Wired HDCP2.2 Tx Session in ME FW
> >   * @dev: device corresponding to the mei_cl_device @@ -70,6 +86,7 @@
> > mei_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data,
> > 
> >  	session_init_in.port.integrated_port_type = data->port_type;
> >  	session_init_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	session_init_in.port.attached_transcoder = mei_get_tc_type(data->tc);
> >  	session_init_in.protocol = data->protocol;
> > 
> >  	byte = mei_cldev_send(cldev, (u8 *)&session_init_in, @@ -139,6
> > +156,7 @@ mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,
> > 
> >  	verify_rxcert_in.port.integrated_port_type = data->port_type;
> >  	verify_rxcert_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	verify_rxcert_in.port.attached_transcoder = mei_get_tc_type(data-
> > >tc);
> > 
> >  	verify_rxcert_in.cert_rx = rx_cert->cert_rx;
> >  	memcpy(verify_rxcert_in.r_rx, &rx_cert->r_rx, HDCP_2_2_RRX_LEN);
> > @@ -209,6 +227,7 @@ mei_hdcp_verify_hprime(struct device *dev, struct
> > hdcp_port_data *data,
> > 
> >  	send_hprime_in.port.integrated_port_type = data->port_type;
> >  	send_hprime_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	send_hprime_in.port.attached_transcoder = mei_get_tc_type(data-
> > >tc);
> > 
> >  	memcpy(send_hprime_in.h_prime, rx_hprime->h_prime,
> >  	       HDCP_2_2_H_PRIME_LEN);
> > @@ -266,6 +285,7 @@ mei_hdcp_store_pairing_info(struct device *dev, struct
> > hdcp_port_data *data,
> > 
> >  	pairing_info_in.port.integrated_port_type = data->port_type;
> >  	pairing_info_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	pairing_info_in.port.attached_transcoder = mei_get_tc_type(data->tc);
> > 
> >  	memcpy(pairing_info_in.e_kh_km, pairing_info->e_kh_km,
> >  	       HDCP_2_2_E_KH_KM_LEN);
> > @@ -324,6 +344,7 @@ mei_hdcp_initiate_locality_check(struct device *dev,
> > 
> >  	lc_init_in.port.integrated_port_type = data->port_type;
> >  	lc_init_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	lc_init_in.port.attached_transcoder = mei_get_tc_type(data->tc);
> > 
> >  	byte = mei_cldev_send(cldev, (u8 *)&lc_init_in, sizeof(lc_init_in));
> >  	if (byte < 0) {
> > @@ -379,6 +400,7 @@ mei_hdcp_verify_lprime(struct device *dev, struct
> > hdcp_port_data *data,
> > 
> >  	verify_lprime_in.port.integrated_port_type = data->port_type;
> >  	verify_lprime_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	verify_lprime_in.port.attached_transcoder = mei_get_tc_type(data-
> > >tc);
> > 
> >  	memcpy(verify_lprime_in.l_prime, rx_lprime->l_prime,
> >  	       HDCP_2_2_L_PRIME_LEN);
> > @@ -436,6 +458,7 @@ static int mei_hdcp_get_session_key(struct device
> > *dev,
> > 
> >  	get_skey_in.port.integrated_port_type = data->port_type;
> >  	get_skey_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	get_skey_in.port.attached_transcoder = mei_get_tc_type(data->tc);
> > 
> >  	byte = mei_cldev_send(cldev, (u8 *)&get_skey_in, sizeof(get_skey_in));
> >  	if (byte < 0) {
> > @@ -500,6 +523,7 @@ mei_hdcp_repeater_check_flow_prepare_ack(struct
> > device *dev,
> > 
> >  	verify_repeater_in.port.integrated_port_type = data->port_type;
> >  	verify_repeater_in.port.physical_port = mei_get_ddi_index(data-
> > >port);
> > +	verify_repeater_in.port.attached_transcoder =
> > +mei_get_tc_type(data->tc);
> > 
> >  	memcpy(verify_repeater_in.rx_info, rep_topology->rx_info,
> >  	       HDCP_2_2_RXINFO_LEN);
> > @@ -570,6 +594,7 @@ static int mei_hdcp_verify_mprime(struct device *dev,
> > 
> >  	verify_mprime_in.port.integrated_port_type = data->port_type;
> >  	verify_mprime_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	verify_mprime_in.port.attached_transcoder = mei_get_tc_type(data-
> > >tc);
> > 
> >  	memcpy(verify_mprime_in.m_prime, stream_ready->m_prime,
> >  	       HDCP_2_2_MPRIME_LEN);
> > @@ -631,6 +656,7 @@ static int mei_hdcp_enable_authentication(struct
> > device *dev,
> > 
> >  	enable_auth_in.port.integrated_port_type = data->port_type;
> >  	enable_auth_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	enable_auth_in.port.attached_transcoder = mei_get_tc_type(data->tc);
> >  	enable_auth_in.stream_type = data->streams[0].stream_type;
> > 
> >  	byte = mei_cldev_send(cldev, (u8 *)&enable_auth_in, @@ -685,6
> > +711,7 @@ mei_hdcp_close_session(struct device *dev, struct hdcp_port_data
> > *data)
> > 
> >  	session_close_in.port.integrated_port_type = data->port_type;
> >  	session_close_in.port.physical_port = mei_get_ddi_index(data->port);
> > +	session_close_in.port.attached_transcoder = mei_get_tc_type(data-
> > >tc);
> > 
> >  	byte = mei_cldev_send(cldev, (u8 *)&session_close_in,
> >  			      sizeof(session_close_in));
> > diff --git a/drivers/misc/mei/hdcp/mei_hdcp.h
> > b/drivers/misc/mei/hdcp/mei_hdcp.h
> > index e4b1cd54c853..89e2f99ff60a 100644
> > --- a/drivers/misc/mei/hdcp/mei_hdcp.h
> > +++ b/drivers/misc/mei/hdcp/mei_hdcp.h
> > @@ -184,8 +184,10 @@ struct hdcp_cmd_no_data {
> >  /* Uniquely identifies the hdcp port being addressed for a given command. */
> > struct hdcp_port_id {
> >  	u8	integrated_port_type;
> > +	/* Used until Gen11.5. Must be zero for Gen11.5+ */
> >  	u8	physical_port;
> > -	u16	reserved;
> > +	u8	attached_transcoder;
> > +	u8	reserved;
> >  } __packed;
> > 
> >  /*
> > @@ -374,4 +376,15 @@ enum mei_fw_ddi {
> >  	MEI_DDI_A = 7,
> >  	MEI_DDI_RANGE_END = MEI_DDI_A,
> >  };
> > +
> > +enum mei_fw_tc {
> > +	MEI_INVALID_TRANSCODER = 0x00,	// Invalid transcoder type
> > +	TC_EDP,				// Transcoder for eDP
> > +	TC_DSI0,			// Transcoder for DSI0
> > +	TC_DSI1,			// Transcoder for DSI1
> > +	TC_A = 0x10,			// Transcoder TCA
> > +	TC_B,				// Transcoder TCB
> > +	TC_C,				// Transcoder TCC
> > +	TC_D				// Transcoder TCD
> > +};
> 
> Don't use // for comments
> Ned MEI_ prefix 
I will fix this.

-Ram
> 
> >  #endif /* __MEI_HDCP_H__ */
> > diff --git a/include/drm/i915_mei_hdcp_interface.h
> > b/include/drm/i915_mei_hdcp_interface.h
> > index 8c344255146a..dc0de63ce0cb 100644
> > --- a/include/drm/i915_mei_hdcp_interface.h
> > +++ b/include/drm/i915_mei_hdcp_interface.h
> > @@ -45,6 +45,7 @@ enum hdcp_wired_protocol {
> >  /**
> >   * struct hdcp_port_data - intel specific HDCP port data
> >   * @port: port index as per I915
> > + * @tc: transcoder index as per I915
> >   * @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 @@ -
> > 57,6 +58,7 @@ enum hdcp_wired_protocol {
> >   */
> >  struct hdcp_port_data {
> >  	enum port port;
> > +	enum transcoder tc;
> >  	u8 port_type;
> >  	u8 protocol;
> >  	u16 k;
> > --
> > 2.20.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-08-20 10:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20  7:30 [PATCH v6 0/3] drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ Ramalingam C
2019-08-20  7:30 ` [PATCH v6 1/3] drm/i915: enum transcoder and pipe are moved into i915_drm.h Ramalingam C
2019-08-20  8:44   ` Winkler, Tomas
2019-08-20  9:03     ` Ramalingam C
2019-08-20 12:30       ` Jani Nikula
2019-08-20 12:48         ` Ramalingam C
2019-08-20  7:30 ` [PATCH v6 2/3] misc/mei_hdcp: Adding the transcoder detail in payload input Ramalingam C
2019-08-20  8:45   ` Winkler, Tomas
2019-08-20 10:20     ` Ramalingam C [this message]
2019-08-20  7:30 ` [PATCH v6 3/3] drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ Ramalingam C
2019-08-20 10:02 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ (rev4) Patchwork
2019-08-20 12:04 ` ✓ Fi.CI.BAT: success " Patchwork
2019-08-20 17:35 ` ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-08-19 15:24 [PATCH v6 0/3] drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ Ramalingam C
2019-08-19 15:24 ` [PATCH v6 2/3] misc/mei_hdcp: Adding the transcoder detail in payload input Ramalingam C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190820102010.GB7668@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tomas.winkler@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.