[Intel-gfx] [PATCH v3 2/4] drm/i915/hdcp: Remove enforce_type0 check outside loop

Jani Nikula jani.nikula at linux.intel.com
Mon May 15 09:46:36 UTC 2023


On Mon, 15 May 2023, Suraj Kandpal <suraj.kandpal at intel.com> wrote:
> Remove enforce_type0 check outside the loop since it
> does not make sense to keep it there as we use the same
> digport and continue checking it again and again
>
> Cc: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_hdcp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index e2c5781ad0ab..f2d258a72c59 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -84,6 +84,9 @@ intel_hdcp_required_content_stream(struct intel_digital_port *dig_port)
>  	if (dig_port->hdcp_auth_status)
>  		return 0;
>  
> +	if (!dig_port->hdcp_mst_type1_capable)
> +		enforce_type0 = true;
> +
>  	drm_connector_list_iter_begin(&i915->drm, &conn_iter);
>  	for_each_intel_connector_iter(connector, &conn_iter) {
>  		if (connector->base.status == connector_status_disconnected)
> @@ -96,9 +99,6 @@ intel_hdcp_required_content_stream(struct intel_digital_port *dig_port)
>  		if (conn_dig_port != dig_port)
>  			continue;
>  
> -		if (!enforce_type0 && !dig_port->hdcp_mst_type1_capable)
> -			enforce_type0 = true;
> -
>  		data->streams[data->k].stream_id = intel_conn_to_vcpi(connector);
>  		data->k++;

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list