summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_hdcp.c
diff options
context:
space:
mode:
authorAnshuman Gupta <anshuman.gupta@intel.com>2021-03-19 15:32:07 +0530
committerAnshuman Gupta <anshuman.gupta@intel.com>2021-03-22 12:20:51 +0530
commit8b06f6d8b4d98d2d379effa20d36fe097e179ccf (patch)
tree124c0fedcc461c3950ecb8f22b5443d4d0b2cea8 /drivers/gpu/drm/i915/display/intel_hdcp.c
parentee912b55650c8eaed43f533155027f62a1d831aa (diff)
downloadlinux-8b06f6d8b4d98d2d379effa20d36fe097e179ccf.tar.gz
linux-8b06f6d8b4d98d2d379effa20d36fe097e179ccf.tar.bz2
linux-8b06f6d8b4d98d2d379effa20d36fe097e179ccf.zip
drm/i915/hdcp: link hdcp2 recovery on link enc stopped
When stream encryption enabling fails due to Link encryption status has stopped, prepare HDCP2 for recovery by disabling port authentication and encryption such that it can re-attempt port authentication and encryption. Cc: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210319100208.5886-3-anshuman.gupta@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_hdcp.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_hdcp.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index 25fee4834588..77650677ba6f 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -1721,6 +1721,7 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector)
{
struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
+ struct hdcp_port_data *data = &dig_port->hdcp_port_data;
struct intel_hdcp *hdcp = &connector->hdcp;
enum transcoder cpu_transcoder = hdcp->cpu_transcoder;
enum port port = dig_port->base.port;
@@ -1730,7 +1731,8 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector)
LINK_ENCRYPTION_STATUS)) {
drm_err(&dev_priv->drm, "[%s:%d] HDCP 2.2 Link is not encrypted\n",
connector->base.name, connector->base.base.id);
- return -EPERM;
+ ret = -EPERM;
+ goto link_recover;
}
if (hdcp->shim->stream_2_2_encryption) {
@@ -1744,6 +1746,15 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector)
transcoder_name(hdcp->stream_transcoder));
}
+ return 0;
+
+link_recover:
+ if (hdcp2_deauthenticate_port(connector) < 0)
+ drm_dbg_kms(&dev_priv->drm, "Port deauth failed.\n");
+
+ dig_port->hdcp_auth_status = false;
+ data->k = 0;
+
return ret;
}