Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 1/3] drm/i915/hdcp: HDCP2.2 MST Link failure recovery
Date: Thu, 18 Mar 2021 11:37:10 +0530	[thread overview]
Message-ID: <6c668e1d-3ef3-f935-8613-9854ae0adace@intel.com> (raw)
In-Reply-To: <20210304085608.21372-2-anshuman.gupta@intel.com>

This makes sense. Now in case of link failure with multiple active streams,

we would be able to set hdcp_auth as false and it would not get missed 
in hdcp2_authentication_encrypt.

Looks good to me.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 3/4/2021 2:26 PM, Anshuman Gupta wrote:
> DP MST Link Check performed only for the connector involved with
> HDCP port authentication and encryption, for other connector it
> simply returns link check with true and update the uevent.
> Therefore in case of HDCP 2.2 link failure, disable HDCP encryption
> and de-authenticate the port so next time it can enable port
> authentication and encryption.
>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_hdcp.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index ae1371c36a32..08dd6b46749d 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -1927,7 +1927,8 @@ static int _intel_hdcp2_enable(struct intel_connector *connector)
>   	return 0;
>   }
>   
> -static int _intel_hdcp2_disable(struct intel_connector *connector)
> +static int
> +_intel_hdcp2_disable(struct intel_connector *connector, bool hdcp2_link_recovery)
>   {
>   	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
>   	struct drm_i915_private *i915 = to_i915(connector->base.dev);
> @@ -1948,7 +1949,7 @@ static int _intel_hdcp2_disable(struct intel_connector *connector)
>   		drm_dbg_kms(&i915->drm, "HDCP 2.2 transcoder: %s stream encryption disabled\n",
>   			    transcoder_name(hdcp->stream_transcoder));
>   
> -		if (dig_port->num_hdcp_streams > 0)
> +		if (dig_port->num_hdcp_streams > 0 && !hdcp2_link_recovery)
>   			return 0;
>   	}
>   
> @@ -1991,6 +1992,7 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
>   			"HDCP2.2 link stopped the encryption, %x\n",
>   			intel_de_read(dev_priv, HDCP2_STATUS(dev_priv, cpu_transcoder, port)));
>   		ret = -ENXIO;
> +		_intel_hdcp2_disable(connector, true);
>   		intel_hdcp_update_value(connector,
>   					DRM_MODE_CONTENT_PROTECTION_DESIRED,
>   					true);
> @@ -2030,7 +2032,7 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
>   			    connector->base.name, connector->base.base.id);
>   	}
>   
> -	ret = _intel_hdcp2_disable(connector);
> +	ret = _intel_hdcp2_disable(connector, true);
>   	if (ret) {
>   		drm_err(&dev_priv->drm,
>   			"[%s:%d] Failed to disable hdcp2.2 (%d)\n",
> @@ -2340,7 +2342,7 @@ int intel_hdcp_disable(struct intel_connector *connector)
>   	intel_hdcp_update_value(connector,
>   				DRM_MODE_CONTENT_PROTECTION_UNDESIRED, false);
>   	if (hdcp->hdcp2_encrypted)
> -		ret = _intel_hdcp2_disable(connector);
> +		ret = _intel_hdcp2_disable(connector, false);
>   	else if (hdcp->hdcp_encrypted)
>   		ret = _intel_hdcp_disable(connector);
>   
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-03-18  6:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04  8:56 [Intel-gfx] [PATCH v2 0/3] HDCP 2.2 MST fixes Anshuman Gupta
2021-03-04  8:56 ` [Intel-gfx] [PATCH v2 1/3] drm/i915/hdcp: HDCP2.2 MST Link failure recovery Anshuman Gupta
2021-03-18  6:07   ` Nautiyal, Ankit K [this message]
2021-03-04  8:56 ` [Intel-gfx] [PATCH v2 2/3] drm/i915/hdcp: link hdcp2 recovery on link enc stopped Anshuman Gupta
2021-03-18  6:31   ` Nautiyal, Ankit K
2021-03-04  8:56 ` [Intel-gfx] [PATCH v2 3/3] drm/i915/hdcp: return correct error code Anshuman Gupta
2021-03-18  6:33   ` Nautiyal, Ankit K
2021-03-04  9:59 ` [Intel-gfx] ✓ Fi.CI.BAT: success for HDCP 2.2 MST fixes (rev2) Patchwork
2021-03-04 11:33 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2021-03-19 10:02 [Intel-gfx] [PATCH v2 0/3] HDCP 2.2 MST fixes Anshuman Gupta
2021-03-19 10:02 ` [Intel-gfx] [PATCH v2 1/3] drm/i915/hdcp: HDCP2.2 MST Link failure recovery Anshuman Gupta

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=6c668e1d-3ef3-f935-8613-9854ae0adace@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox