[Intel-gfx] [PATCH v3 4/4] drm/i915/hdcp: Fill hdcp2_streamid_type and k in appropriate places

Nautiyal, Ankit K ankit.k.nautiyal at intel.com
Mon May 15 10:16:44 UTC 2023


LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>

On 5/15/2023 10:45 AM, Suraj Kandpal wrote:
> stream_id and k(no of streams) should be set in
> intel_hdcp_set_content_streams. stream_type should be set in
> intel_hdcp_required_content_stream.
>
> Cc: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_hdcp.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 64875c33832c..8c068a9c0a30 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -102,8 +102,11 @@ intel_hdcp_set_content_streams(struct intel_digital_port *dig_port,
>   	struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
>   	struct hdcp_port_data *data = &dig_port->hdcp_port_data;
>   
> -	if (!intel_encoder_is_mst(&dig_port->base))
> +	if (!intel_encoder_is_mst(&dig_port->base)) {
> +		data->k = 1;
> +		data->streams[0].stream_id = 0;
>   		return 0;
> +	}
>   
>   	data->k = 0;
>   
> @@ -143,7 +146,6 @@ static int intel_hdcp_prepare_streams(struct intel_connector *connector)
>   	int ret;
>   
>   	if (!intel_encoder_is_mst(intel_attached_encoder(connector))) {
> -		data->k = 1;
>   		data->streams[0].stream_type = hdcp->content_type;
>   	} else {
>   		ret = intel_hdcp_required_content_stream(dig_port);
> @@ -2215,7 +2217,6 @@ static int initialize_hdcp_port_data(struct intel_connector *connector,
>   {
>   	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
>   	struct hdcp_port_data *data = &dig_port->hdcp_port_data;
> -	struct intel_hdcp *hdcp = &connector->hdcp;
>   	enum port port = dig_port->base.port;
>   
>   	if (DISPLAY_VER(dev_priv) < 12)
> @@ -2245,9 +2246,6 @@ static int initialize_hdcp_port_data(struct intel_connector *connector,
>   		drm_err(&dev_priv->drm, "Out of Memory\n");
>   		return -ENOMEM;
>   	}
> -	/* For SST */
> -	data->streams[0].stream_id = 0;
> -	data->streams[0].stream_type = hdcp->content_type;
>   
>   	return 0;
>   }


More information about the Intel-gfx mailing list