diff mbox series

[v10,14/40] drm/i915: Handle HDCP2.2 downstream topology change

Message ID 1548917996-28081-15-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Implement HDCP2.2 | expand

Commit Message

Ramalingam C Jan. 31, 2019, 6:59 a.m. UTC
When repeater notifies a downstream topology change, this patch
reauthenticate the repeater alone without disabling the hdcp
encryption. If that fails then complete reauthentication is executed.

v2:
  Rebased.
v3:
  Typo in commit msg is fixed [Uma]
v4:
  Rebased as part of patch reordering.
  Minor style fixes.
v5:
  Rebased.
v6:
  Rebased.
v7:
  Errors due to sinks are reported as DEBUG logs.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
---
 drivers/gpu/drm/i915/intel_hdcp.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

Comments

Shankar, Uma Feb. 4, 2019, 2:31 p.m. UTC | #1
>-----Original Message-----
>From: C, Ramalingam
>Sent: Thursday, January 31, 2019 12:30 PM
>To: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org;
>daniel.vetter@ffwll.ch; Winkler, Tomas <tomas.winkler@intel.com>; Shankar,
>Uma <uma.shankar@intel.com>
>Cc: C, Ramalingam <ramalingam.c@intel.com>
>Subject: [PATCH v10 14/40] drm/i915: Handle HDCP2.2 downstream topology
>change
>
>When repeater notifies a downstream topology change, this patch
>reauthenticate the repeater alone without disabling the hdcp encryption. If that
>fails then complete reauthentication is executed.
>
>v2:
>  Rebased.
>v3:
>  Typo in commit msg is fixed [Uma]
>v4:
>  Rebased as part of patch reordering.
>  Minor style fixes.
>v5:
>  Rebased.
>v6:
>  Rebased.
>v7:
>  Errors due to sinks are reported as DEBUG logs.
>
>Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>Reviewed-by: Uma Shankar <uma.shankar@intel.com>

The latest version is ok. You can keep the RB.

>---
> drivers/gpu/drm/i915/intel_hdcp.c | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/intel_hdcp.c
>b/drivers/gpu/drm/i915/intel_hdcp.c
>index 3feff921a547..7ff29fb0aa2f 100644
>--- a/drivers/gpu/drm/i915/intel_hdcp.c
>+++ b/drivers/gpu/drm/i915/intel_hdcp.c
>@@ -1617,8 +1617,24 @@ static int intel_hdcp2_check_link(struct
>intel_connector *connector)
> 		goto out;
> 	}
>
>-	DRM_DEBUG_KMS("[%s:%d] HDCP2.2 link failed, retrying auth\n",
>-		      connector->base.name, connector->base.base.id);
>+	if (ret == HDCP_TOPOLOGY_CHANGE) {
>+		if (hdcp->value ==
>DRM_MODE_CONTENT_PROTECTION_UNDESIRED)
>+			goto out;
>+
>+		DRM_DEBUG_KMS("HDCP2.2 Downstream topology change\n");
>+		ret = hdcp2_authenticate_repeater_topology(connector);
>+		if (!ret) {
>+			hdcp->value =
>DRM_MODE_CONTENT_PROTECTION_ENABLED;
>+			schedule_work(&hdcp->prop_work);
>+			goto out;
>+		}
>+		DRM_DEBUG_KMS("[%s:%d] Repeater topology auth
>failed.(%d)\n",
>+			      connector->base.name, connector->base.base.id,
>+			      ret);
>+	} else {
>+		DRM_DEBUG_KMS("[%s:%d] HDCP2.2 link failed, retrying
>auth\n",
>+			      connector->base.name, connector->base.base.id);
>+	}
>
> 	ret = _intel_hdcp2_disable(connector);
> 	if (ret) {
>--
>2.7.4
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index 3feff921a547..7ff29fb0aa2f 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -1617,8 +1617,24 @@  static int intel_hdcp2_check_link(struct intel_connector *connector)
 		goto out;
 	}
 
-	DRM_DEBUG_KMS("[%s:%d] HDCP2.2 link failed, retrying auth\n",
-		      connector->base.name, connector->base.base.id);
+	if (ret == HDCP_TOPOLOGY_CHANGE) {
+		if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_UNDESIRED)
+			goto out;
+
+		DRM_DEBUG_KMS("HDCP2.2 Downstream topology change\n");
+		ret = hdcp2_authenticate_repeater_topology(connector);
+		if (!ret) {
+			hdcp->value = DRM_MODE_CONTENT_PROTECTION_ENABLED;
+			schedule_work(&hdcp->prop_work);
+			goto out;
+		}
+		DRM_DEBUG_KMS("[%s:%d] Repeater topology auth failed.(%d)\n",
+			      connector->base.name, connector->base.base.id,
+			      ret);
+	} else {
+		DRM_DEBUG_KMS("[%s:%d] HDCP2.2 link failed, retrying auth\n",
+			      connector->base.name, connector->base.base.id);
+	}
 
 	ret = _intel_hdcp2_disable(connector);
 	if (ret) {