[PATCH 7/8] drm/i915: Reauthenticate HDCP on failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When HDCP authentication fails, we add two more reauthentication.
This will address all reauth expectation from compliance perspective.

Signed-off-by: Ramalingam C <ramalingam.c@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_hdcp.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index a3463557f0f6..3caa548a9cad 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -566,7 +566,7 @@ static int _intel_hdcp_disable(struct intel_connector *connector)
 static int _intel_hdcp_enable(struct intel_connector *connector)
 {
 	struct drm_i915_private *dev_priv = connector->base.dev->dev_private;
-	int i, ret;
+	int i, ret, reauth = 1;
 
 	if (!(I915_READ(SKL_FUSE_STATUS) & SKL_FUSE_PG_DIST_STATUS(1))) {
 		DRM_ERROR("PG1 is disabled, cannot load keys\n");
@@ -584,13 +584,17 @@ static int _intel_hdcp_enable(struct intel_connector *connector)
 		return ret;
 	}
 
-	ret = intel_hdcp_auth(connector);
-	if (ret) {
-		DRM_ERROR("Failed to authenticate HDCP (%d)\n", ret);
-		return ret;
-	}
+	do {
+		ret = intel_hdcp_auth(connector);
+		if (ret)
+			DRM_ERROR("Failed to authenticate HDCP (%d)\n", ret);
+		if (ret && reauth)
+			DRM_DEBUG_KMS("[%s:%d] HDCP Reauth... %d/1\n",
+					connector->base.name,
+					connector->base.base.id, reauth);
+	} while (ret && reauth--);
 
-	return 0;
+	return ret;
 }
 
 static void intel_hdcp_check_work(struct work_struct *work)
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux