diff mbox series

drm/i915/hdcp: Fail Repeater authentication if Type1 device not present

Message ID 20231215050915.2070119-1-suraj.kandpal@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/hdcp: Fail Repeater authentication if Type1 device not present | expand

Commit Message

Kandpal, Suraj Dec. 15, 2023, 5:09 a.m. UTC
Fail repeater authentication step in case RX_INFO indicates
HDCP1.x or HDCP2.0/2.1 device is present downstream in repeater
topology and content type set by userspace is Type1.

--v2
-Fix build error.

--v3
-remove mst encoder check as branch device also act as repeater

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 | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Nautiyal, Ankit K Dec. 22, 2023, 5:40 a.m. UTC | #1
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 12/15/2023 10:39 AM, Suraj Kandpal wrote:
> Fail repeater authentication step in case RX_INFO indicates
> HDCP1.x or HDCP2.0/2.1 device is present downstream in repeater
> topology and content type set by userspace is Type1.
>
> --v2
> -Fix build error.
>
> --v3
> -remove mst encoder check as branch device also act as repeater
>
> 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 | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 39b3f7c0c77c..c264e443ffac 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -1633,6 +1633,12 @@ int hdcp2_authenticate_repeater_topology(struct intel_connector *connector)
>   		!HDCP_2_2_HDCP1_DEVICE_CONNECTED(rx_info[1]) &&
>   		!HDCP_2_2_HDCP_2_0_REP_CONNECTED(rx_info[1]);
>   
> +	if (!dig_port->hdcp_mst_type1_capable && hdcp->content_type) {
> +		drm_dbg_kms(&i915->drm,
> +			    "HDCP1.x or 2.0 Legacy Device Downstream\n");
> +		return -EINVAL;
> +	}
> +
>   	/* Converting and Storing the seq_num_v to local variable as DWORD */
>   	seq_num_v =
>   		drm_hdcp_be24_to_cpu((const u8 *)msgs.recvid_list.seq_num_v);
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 39b3f7c0c77c..c264e443ffac 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -1633,6 +1633,12 @@  int hdcp2_authenticate_repeater_topology(struct intel_connector *connector)
 		!HDCP_2_2_HDCP1_DEVICE_CONNECTED(rx_info[1]) &&
 		!HDCP_2_2_HDCP_2_0_REP_CONNECTED(rx_info[1]);
 
+	if (!dig_port->hdcp_mst_type1_capable && hdcp->content_type) {
+		drm_dbg_kms(&i915->drm,
+			    "HDCP1.x or 2.0 Legacy Device Downstream\n");
+		return -EINVAL;
+	}
+
 	/* Converting and Storing the seq_num_v to local variable as DWORD */
 	seq_num_v =
 		drm_hdcp_be24_to_cpu((const u8 *)msgs.recvid_list.seq_num_v);