diff mbox series

[10/13] drm/i915/hdcp: Don't enable HDCP2.2 directly from check_link

Message ID 20240215105919.1439549-11-suraj.kandpal@intel.com (mailing list archive)
State New, archived
Headers show
Series HDCP MST Type1 fixes | expand

Commit Message

Kandpal, Suraj Feb. 15, 2024, 10:59 a.m. UTC
Whenever LIC fails instead of moving from ENABLED to DESIRED
CP property we directly enable HDCP2.2 without informing the userspace
of this failure in link integrity check.
Now we will just update the value to DESIRED send the event to
userspace and then continue with the normal flow of HDCP enablement.

--v2
-Don't change the function prototype in this function [Ankit]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdcp.c | 25 ++---------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

Comments

Nautiyal, Ankit K Feb. 16, 2024, 3:17 a.m. UTC | #1
On 2/15/2024 4:29 PM, Suraj Kandpal wrote:
> Whenever LIC fails instead of moving from ENABLED to DESIRED
> CP property we directly enable HDCP2.2 without informing the userspace
> of this failure in link integrity check.
> Now we will just update the value to DESIRED send the event to
> userspace and then continue with the normal flow of HDCP enablement.
>
> --v2
> -Don't change the function prototype in this function [Ankit]
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

> ---
>   drivers/gpu/drm/i915/display/intel_hdcp.c | 25 ++---------------------
>   1 file changed, 2 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 16b2b180563f..3bd783b8deac 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -2068,17 +2068,6 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
>   
>   		drm_dbg_kms(&i915->drm,
>   			    "HDCP2.2 Downstream topology change\n");
> -		ret = hdcp2_authenticate_repeater_topology(connector);
> -		if (!ret) {
> -			intel_hdcp_update_value(connector,
> -					DRM_MODE_CONTENT_PROTECTION_ENABLED,
> -					true);
> -			goto out;
> -		}
> -		drm_dbg_kms(&i915->drm,
> -			    "[CONNECTOR:%d:%s] Repeater topology auth failed.(%d)\n",
> -			    connector->base.base.id, connector->base.name,
> -			    ret);
>   	} else {
>   		drm_dbg_kms(&i915->drm,
>   			    "[CONNECTOR:%d:%s] HDCP2.2 link failed, retrying auth\n",
> @@ -2095,18 +2084,8 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
>   		goto out;
>   	}
>   
> -	ret = _intel_hdcp2_enable(connector);
> -	if (ret) {
> -		drm_dbg_kms(&i915->drm,
> -			    "[CONNECTOR:%d:%s] Failed to enable hdcp2.2 (%d)\n",
> -			    connector->base.base.id, connector->base.name,
> -			    ret);
> -		intel_hdcp_update_value(connector,
> -					DRM_MODE_CONTENT_PROTECTION_DESIRED,
> -					true);
> -		goto out;
> -	}
> -
> +	intel_hdcp_update_value(connector,
> +				DRM_MODE_CONTENT_PROTECTION_DESIRED, true);
>   out:
>   	mutex_unlock(&dig_port->hdcp_mutex);
>   	mutex_unlock(&hdcp->mutex);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index 16b2b180563f..3bd783b8deac 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -2068,17 +2068,6 @@  static int intel_hdcp2_check_link(struct intel_connector *connector)
 
 		drm_dbg_kms(&i915->drm,
 			    "HDCP2.2 Downstream topology change\n");
-		ret = hdcp2_authenticate_repeater_topology(connector);
-		if (!ret) {
-			intel_hdcp_update_value(connector,
-					DRM_MODE_CONTENT_PROTECTION_ENABLED,
-					true);
-			goto out;
-		}
-		drm_dbg_kms(&i915->drm,
-			    "[CONNECTOR:%d:%s] Repeater topology auth failed.(%d)\n",
-			    connector->base.base.id, connector->base.name,
-			    ret);
 	} else {
 		drm_dbg_kms(&i915->drm,
 			    "[CONNECTOR:%d:%s] HDCP2.2 link failed, retrying auth\n",
@@ -2095,18 +2084,8 @@  static int intel_hdcp2_check_link(struct intel_connector *connector)
 		goto out;
 	}
 
-	ret = _intel_hdcp2_enable(connector);
-	if (ret) {
-		drm_dbg_kms(&i915->drm,
-			    "[CONNECTOR:%d:%s] Failed to enable hdcp2.2 (%d)\n",
-			    connector->base.base.id, connector->base.name,
-			    ret);
-		intel_hdcp_update_value(connector,
-					DRM_MODE_CONTENT_PROTECTION_DESIRED,
-					true);
-		goto out;
-	}
-
+	intel_hdcp_update_value(connector,
+				DRM_MODE_CONTENT_PROTECTION_DESIRED, true);
 out:
 	mutex_unlock(&dig_port->hdcp_mutex);
 	mutex_unlock(&hdcp->mutex);