diff mbox

[v2,1/8] drm/i915: Handle failure from 2nd stage HDCP auth

Message ID 1517602296-2386-2-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ramalingam C Feb. 2, 2018, 8:11 p.m. UTC
We enable the HDCP encryption as a part of first stage authentication.
So when second stage authentication fails, we need to disable the HDCP
encryption and signalling.

This patch ensures that, when hdcp authentication fails, HDCP encryption
and signalling is turned off.

v2:
  Dropped connector ref passing to auth [Seanpaul]
  Moved the call to disable_hdcp() to enable_hdcp() [Seanpaul]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 drivers/gpu/drm/i915/intel_hdcp.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Sean Paul Feb. 2, 2018, 8:52 p.m. UTC | #1
On Sat, Feb 03, 2018 at 01:41:29AM +0530, Ramalingam C wrote:
> We enable the HDCP encryption as a part of first stage authentication.
> So when second stage authentication fails, we need to disable the HDCP
> encryption and signalling.
> 
> This patch ensures that, when hdcp authentication fails, HDCP encryption
> and signalling is turned off.
> 
> v2:
>   Dropped connector ref passing to auth [Seanpaul]
>   Moved the call to disable_hdcp() to enable_hdcp() [Seanpaul]
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
>  drivers/gpu/drm/i915/intel_hdcp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> index b97184eccd9c..de9a925c122d 100644
> --- a/drivers/gpu/drm/i915/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> @@ -562,6 +562,9 @@ static int _intel_hdcp_enable(struct intel_connector *connector)
>  			      connector->hdcp_shim);
>  	if (ret) {
>  		DRM_ERROR("Failed to authenticate HDCP (%d)\n", ret);
> +
> +		/* Ensuring HDCP encryption and signalling are stopped. */
> +		_intel_hdcp_disable(connector);
>  		return ret;
>  	}
>  
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index b97184eccd9c..de9a925c122d 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -562,6 +562,9 @@  static int _intel_hdcp_enable(struct intel_connector *connector)
 			      connector->hdcp_shim);
 	if (ret) {
 		DRM_ERROR("Failed to authenticate HDCP (%d)\n", ret);
+
+		/* Ensuring HDCP encryption and signalling are stopped. */
+		_intel_hdcp_disable(connector);
 		return ret;
 	}