From: Anshuman Gupta <anshuman.gupta@intel.com>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: terminate reauth at stream management failure
Date: Tue, 11 Feb 2020 11:43:01 +0530 [thread overview]
Message-ID: <20200211061301.GA3527@intel.com> (raw)
In-Reply-To: <20200210164950.6241-1-ramalingam.c@intel.com>
On 2020-02-10 at 22:19:50 +0530, Ramalingam C wrote:
> As per the HDCP2.2 compliance test 1B-10 expectation, when stream
> management for a repeater fails, HDCP2.2 reauthentication stops at
> kernel.
Shall i drop my patch now and continue with reviewing this patch.
one comment below.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_hdcp.c | 55 ++++++++++++++---------
> 1 file changed, 34 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 4d1a33d13105..5ab35484da93 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -1380,7 +1380,7 @@ static int hdcp2_session_key_exchange(struct intel_connector *connector)
> }
>
> static
> -int hdcp2_propagate_stream_management_info(struct intel_connector *connector)
> +int _hdcp2_propagate_stream_management_info(struct intel_connector *connector)
> {
> struct intel_digital_port *intel_dig_port = intel_attached_dig_port(connector);
> struct intel_hdcp *hdcp = &connector->hdcp;
> @@ -1492,17 +1492,6 @@ int hdcp2_authenticate_repeater_topology(struct intel_connector *connector)
> return 0;
> }
>
> -static int hdcp2_authenticate_repeater(struct intel_connector *connector)
> -{
> - int ret;
> -
> - ret = hdcp2_authenticate_repeater_topology(connector);
> - if (ret < 0)
> - return ret;
> -
> - return hdcp2_propagate_stream_management_info(connector);
> -}
> -
> static int hdcp2_authenticate_sink(struct intel_connector *connector)
> {
> struct intel_digital_port *intel_dig_port = intel_attached_dig_port(connector);
> @@ -1537,18 +1526,13 @@ static int hdcp2_authenticate_sink(struct intel_connector *connector)
> }
>
> if (hdcp->is_repeater) {
> - ret = hdcp2_authenticate_repeater(connector);
> + ret = hdcp2_authenticate_repeater_topology(connector);
> if (ret < 0) {
> DRM_DEBUG_KMS("Repeater Auth Failed. Err: %d\n", ret);
> return ret;
> }
> }
>
> - hdcp->port_data.streams[0].stream_type = hdcp->content_type;
> - ret = hdcp2_authenticate_port(connector);
> - if (ret < 0)
> - return ret;
> -
> return ret;
> }
>
> @@ -1626,14 +1610,43 @@ static int hdcp2_disable_encryption(struct intel_connector *connector)
> return ret;
> }
>
> +static int
> +hdcp2_propagate_stream_management_info(struct intel_connector *connector)
> +{
> + int i, tries = 3, ret;
> +
> + if (!connector->hdcp.is_repeater)
> + return 0;
> +
> + for (i = 0; i < tries; i++) {
> + ret = _hdcp2_propagate_stream_management_info(connector);
> + if (!ret)
> + break;
> + }
> +
> + return ret;
> +}
> +
> static int hdcp2_authenticate_and_encrypt(struct intel_connector *connector)
> {
> + struct intel_hdcp *hdcp = &connector->hdcp;
> int ret, i, tries = 3;
>
> for (i = 0; i < tries; i++) {
> ret = hdcp2_authenticate_sink(connector);
> - if (!ret)
> - break;
> + if (!ret) {
> + ret = hdcp2_propagate_stream_management_info(connector);
we need to increment seq_num_m fo every retry of stream management.
Thanks,
Anshuman Gupta.
> + if (!ret) {
> + hdcp->port_data.streams[0].stream_type =
> + hdcp->content_type;
> + ret = hdcp2_authenticate_port(connector);
> + if (!ret)
> + break;
> + } else {
> + DRM_DEBUG_KMS("HDCP2 stream management failed\n");
> + break;
> + }
> + }
>
> /* Clearing the mei hdcp session */
> DRM_DEBUG_KMS("HDCP2.2 Auth %d of %d Failed.(%d)\n",
> @@ -1642,7 +1655,7 @@ static int hdcp2_authenticate_and_encrypt(struct intel_connector *connector)
> DRM_DEBUG_KMS("Port deauth failed.\n");
> }
>
> - if (i != tries) {
> + if (!ret) {
> /*
> * Ensuring the required 200mSec min time interval between
> * Session Key Exchange and encryption.
> --
> 2.20.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-02-11 6:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 15:04 [Intel-gfx] [PATCH 0/2] HDCP 2.2 Comp fixes Anshuman Gupta
2020-02-06 15:04 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Fix 1B-06 HDCP2.2 Comp test Anshuman Gupta
2020-02-06 17:00 ` Ramalingam C
2020-02-06 17:09 ` Anshuman Gupta
2020-02-06 17:36 ` Ramalingam C
2020-02-06 18:30 ` Anshuman Gupta
2020-02-07 6:40 ` Ramalingam C
2020-02-06 15:04 ` [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Fix 1B-10 HDCP 2.2 " Anshuman Gupta
2020-02-06 17:13 ` Ramalingam C
2020-02-10 16:49 ` [Intel-gfx] [PATCH] drm/i915: terminate reauth at stream management failure Ramalingam C
2020-02-11 6:13 ` Anshuman Gupta [this message]
2020-02-06 16:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success for HDCP 2.2 Comp fixes Patchwork
2020-02-09 9:28 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-02-10 19:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success for HDCP 2.2 Comp fixes (rev2) 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=20200211061301.GA3527@intel.com \
--to=anshuman.gupta@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ramalingam.c@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.