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: "Nikula, Jani" <jani.nikula@intel.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v10 4/6] misc/mei/hdcp: Fill transcoder index in port info
Date: Tue, 27 Aug 2019 20:11:01 +0530	[thread overview]
Message-ID: <20190827144101.GD5040@intel.com> (raw)
In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9DCA5021@hasmsx108.ger.corp.intel.com>

On 2019-08-27 at 20:07:04 +0530, Winkler, Tomas wrote:
> 
> > 
> > On 2019-08-27 at 19:49:19 +0530, Winkler, Tomas wrote:
> > > > For gen12+ platform we need to pass the transcoder info as part of
> > > > the port info into ME FW.
> > > >
> > > > This change fills the payload for ME FW from hdcp_port_data.
> > > >
> > > > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > > > Acked-by: Jani Nikula <jani.nikula@intel.com>
> > > > Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
> > > > ---
> > > >  drivers/misc/mei/hdcp/mei_hdcp.c | 11 +++++++++++
> > > > drivers/misc/mei/hdcp/mei_hdcp.h |  4 +++-
> > > >  2 files changed, 14 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c
> > > > b/drivers/misc/mei/hdcp/mei_hdcp.c
> > > > index 3638c77eba26..93027fd96c71 100644
> > > > --- a/drivers/misc/mei/hdcp/mei_hdcp.c
> > > > +++ b/drivers/misc/mei/hdcp/mei_hdcp.c
> > > > @@ -58,6 +58,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 = (u8)data->fw_ddi;
> > > > +	session_init_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >  	session_init_in.protocol = data->protocol;
> > > >
> > > >  	byte = mei_cldev_send(cldev, (u8 *)&session_init_in, @@ -127,6
> > > > +128,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 = (u8)data->fw_ddi;
> > > > +	verify_rxcert_in.port.attached_transcoder = (u8)data->fw_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);
> > > > @@ -197,6 +199,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 = (u8)data->fw_ddi;
> > > > +	send_hprime_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >
> > > >  	memcpy(send_hprime_in.h_prime, rx_hprime->h_prime,
> > > >  	       HDCP_2_2_H_PRIME_LEN);
> > > > @@ -254,6 +257,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 = (u8)data->fw_ddi;
> > > > +	pairing_info_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >
> > > >  	memcpy(pairing_info_in.e_kh_km, pairing_info->e_kh_km,
> > > >  	       HDCP_2_2_E_KH_KM_LEN);
> > > > @@ -312,6 +316,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 = (u8)data->fw_ddi;
> > > > +	lc_init_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >
> > > >  	byte = mei_cldev_send(cldev, (u8 *)&lc_init_in, sizeof(lc_init_in));
> > > >  	if (byte < 0) {
> > > > @@ -367,6 +372,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 = (u8)data->fw_ddi;
> > > > +	verify_lprime_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >
> > > >  	memcpy(verify_lprime_in.l_prime, rx_lprime->l_prime,
> > > >  	       HDCP_2_2_L_PRIME_LEN);
> > > > @@ -424,6 +430,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 = (u8)data->fw_ddi;
> > > > +	get_skey_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >
> > > >  	byte = mei_cldev_send(cldev, (u8 *)&get_skey_in, sizeof(get_skey_in));
> > > >  	if (byte < 0) {
> > > > @@ -488,6 +495,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 = (u8)data->fw_ddi;
> > > > +	verify_repeater_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >
> > > >  	memcpy(verify_repeater_in.rx_info, rep_topology->rx_info,
> > > >  	       HDCP_2_2_RXINFO_LEN);
> > > > @@ -558,6 +566,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 = (u8)data->fw_ddi;
> > > > +	verify_mprime_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >
> > > >  	memcpy(verify_mprime_in.m_prime, stream_ready->m_prime,
> > > >  	       HDCP_2_2_MPRIME_LEN);
> > > > @@ -619,6 +628,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 = (u8)data->fw_ddi;
> > > > +	enable_auth_in.port.attached_transcoder = (u8)data->fw_tc;
> > > >  	enable_auth_in.stream_type = data->streams[0].stream_type;
> > > >
> > > >  	byte = mei_cldev_send(cldev, (u8 *)&enable_auth_in, @@ -673,6
> > > > +683,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 = (u8)data->fw_ddi;
> > > > +	session_close_in.port.attached_transcoder = (u8)data->fw_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 e60282eb2d48..58e439d2fc1a 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+ */
> > > What are you reference here, the member bellow or above? -  It is better to
> > document it in using kdoc!
> > > Next, what part of the code is validating this?
> > This is documentation for physical_port. As these structures are ME FW API
> > payloads, i dont think we need a kdoc on it. Please let me know if you think
> > otherwise.
> I asked for kdoc, because it is not clear from the comment what member are you commenting on,
> In other words the comment is lacking the subject. 
I will rephrase it as /* physical_port is used until Gen11.5. Must be zero for Gen11.5+ */
Hope that looks good to you.

-Ram
> 
> > 
> > This is checked at ME FW and returned with ERROR Code.
> > And as only I915 knows the GEN#, i915 takes care of the filling this member
> > with Zero(INVALID_PORT), for gen12+.
> > 
> > >
> > > >  	u8	physical_port;
> > > > -	u16	reserved;
> > >
> > > > +	u8	attached_transcoder;
> > > Also here need the documentation
> > In this file we are not documenting each member of the struct. IMHO variable
> > name is self documenting.
> > 
> > Since there was a special expectation on physical port on gen12+, I have added
> > the comment.
> > 
> > -Ram
> > > > +	u8	reserved;
> > > >  } __packed;
> > > >
> > > >  /*
> > > > --
> > > > 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-27 14:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 10:50 [PATCH v10 0/6] drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ Ramalingam C
2019-08-27 10:50 ` [PATCH v10 1/6] drm/i915: mei_hdcp: I915 sends ddi index as per ME FW Ramalingam C
2019-08-27 10:50 ` [PATCH v10 2/6] drm: Move port definition back to i915 header Ramalingam C
2019-08-27 10:50 ` [PATCH v10 3/6] drm: Extend I915 mei interface for transcoder info Ramalingam C
2019-08-27 14:00   ` Winkler, Tomas
2019-08-27 14:20     ` Ramalingam C
2019-08-27 10:50 ` [PATCH v10 4/6] misc/mei/hdcp: Fill transcoder index in port info Ramalingam C
2019-08-27 14:19   ` Winkler, Tomas
2019-08-27 14:31     ` Ramalingam C
2019-08-27 14:37       ` Winkler, Tomas
2019-08-27 14:41         ` Ramalingam C [this message]
2019-08-27 10:50 ` [PATCH v10 5/6] drm/i915/hdcp: update current transcoder into intel_hdcp Ramalingam C
2019-08-27 14:33   ` Winkler, Tomas
2019-08-27 14:52     ` Ramalingam C
2019-08-27 20:31       ` Winkler, Tomas
2019-08-28  7:05         ` Ramalingam C
2019-08-27 10:50 ` [PATCH v10 6/6] drm/i915/hdcp: Enable HDCP 1.4 and 2.2 on Gen12+ Ramalingam C
2019-08-27 12:25 ` ✓ Fi.CI.BAT: success for drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ (rev8) Patchwork
2019-08-27 13:02 ` [PATCH v10 0/6] drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ Winkler, Tomas
2019-08-27 13:22   ` Ramalingam C
2019-08-27 13:32     ` Winkler, Tomas
2019-08-28 11:00 ` ✓ Fi.CI.IGT: success for drm/i915: Enable HDCP 1.4 and 2.2 on Gen12+ (rev8) Patchwork

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=20190827144101.GD5040@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --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.