diff mbox

[v3,28/40] drm/i915: Handle HDCP2.2 downstream topology change

Message ID 1522763873-23041-29-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ramalingam C April 3, 2018, 1:57 p.m. UTC
When repeater notifies a downstream topology change, this patch
reauthenticate the repeater alone with out disabling the hdcp
encryption. If that fails then complete reauthentication is executed.

v2:
  Rebased.
v3:
  No Changes.

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

Comments

Shankar, Uma May 18, 2018, 12:09 p.m. UTC | #1
>-----Original Message-----

>From: dri-devel [mailto:dri-devel-bounces@lists.freedesktop.org] On Behalf Of

>Ramalingam C

>Sent: Tuesday, April 3, 2018 7:28 PM

>To: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org;

>seanpaul@chromium.org; daniel@ffwll.ch; chris@chris-wilson.co.uk;

>jani.nikula@linux.intel.com; Winkler, Tomas <tomas.winkler@intel.com>;

>Usyskin, Alexander <alexander.usyskin@intel.com>

>Cc: Vivi, Rodrigo <rodrigo.vivi@intel.com>

>Subject: [PATCH v3 28/40] drm/i915: Handle HDCP2.2 downstream topology

>change

>

>When repeater notifies a downstream topology change, this patch

>reauthenticate the repeater alone with out disabling the hdcp encryption. If that


Don’t leave a space b/w with and out. 

With that fix.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>


>fails then complete reauthentication is executed.

>

>v2:

>  Rebased.

>v3:

>  No Changes.

>

>Signed-off-by: Ramalingam C <ramalingam.c@intel.com>

>---

> drivers/gpu/drm/i915/intel_hdcp.c | 19 +++++++++++++++++--

> 1 file changed, 17 insertions(+), 2 deletions(-)

>

>diff --git a/drivers/gpu/drm/i915/intel_hdcp.c

>b/drivers/gpu/drm/i915/intel_hdcp.c

>index e2aec73aefe3..fd30e2b1ddc3 100644

>--- a/drivers/gpu/drm/i915/intel_hdcp.c

>+++ b/drivers/gpu/drm/i915/intel_hdcp.c

>@@ -1497,8 +1497,23 @@ static int intel_hdcp2_check_link(struct

>intel_connector *connector)

> 		goto out;

> 	}

>

>-	DRM_INFO("[%s:%d] HDCP2.2 link failed, retrying authentication\n",

>-		 connector->base.name, connector->base.base.id);

>+	if (ret == DRM_HDCP_TOPOLOGY_CHANGE) {

>+		if (hdcp->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->hdcp_value =

>DRM_MODE_CONTENT_PROTECTION_ENABLED;

>+			schedule_work(&hdcp->hdcp_prop_work);

>+			goto out;

>+		}

>+		DRM_ERROR("[%s:%d] Repeater topology auth failed.(%d)\n",

>+			  connector->base.name, connector->base.base.id, ret);

>+	} else {

>+		DRM_ERROR("[%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

>

>_______________________________________________

>dri-devel mailing list

>dri-devel@lists.freedesktop.org

>https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index e2aec73aefe3..fd30e2b1ddc3 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -1497,8 +1497,23 @@  static int intel_hdcp2_check_link(struct intel_connector *connector)
 		goto out;
 	}
 
-	DRM_INFO("[%s:%d] HDCP2.2 link failed, retrying authentication\n",
-		 connector->base.name, connector->base.base.id);
+	if (ret == DRM_HDCP_TOPOLOGY_CHANGE) {
+		if (hdcp->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->hdcp_value = DRM_MODE_CONTENT_PROTECTION_ENABLED;
+			schedule_work(&hdcp->hdcp_prop_work);
+			goto out;
+		}
+		DRM_ERROR("[%s:%d] Repeater topology auth failed.(%d)\n",
+			  connector->base.name, connector->base.base.id, ret);
+	} else {
+		DRM_ERROR("[%s:%d] HDCP2.2 link failed, retrying auth\n",
+			 connector->base.name, connector->base.base.id);
+	}
 
 	ret = _intel_hdcp2_disable(connector);
 	if (ret) {