Commit e45c5f1a authored by Suraj Kandpal's avatar Suraj Kandpal Committed by Animesh Manna

drm/i915/hdcp: Fill hdcp2_streamid_type and k in appropriate places

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.

--v5
-add missing stream_id assignment [Ankit]

Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: default avatarSuraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: default avatarAnimesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230515112726.689116-1-suraj.kandpal@intel.com
parent a6d82f1b
...@@ -97,7 +97,6 @@ static void intel_hdcp_prepare_streams(struct intel_connector *connector) ...@@ -97,7 +97,6 @@ static void intel_hdcp_prepare_streams(struct intel_connector *connector)
struct intel_hdcp *hdcp = &connector->hdcp; struct intel_hdcp *hdcp = &connector->hdcp;
if (!intel_encoder_is_mst(intel_attached_encoder(connector))) { if (!intel_encoder_is_mst(intel_attached_encoder(connector))) {
data->k = 1;
data->streams[0].stream_type = hdcp->content_type; data->streams[0].stream_type = hdcp->content_type;
} else { } else {
intel_hdcp_required_content_stream(dig_port); intel_hdcp_required_content_stream(dig_port);
...@@ -2161,7 +2160,6 @@ static int initialize_hdcp_port_data(struct intel_connector *connector, ...@@ -2161,7 +2160,6 @@ static int initialize_hdcp_port_data(struct intel_connector *connector,
{ {
struct drm_i915_private *dev_priv = to_i915(connector->base.dev); struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
struct hdcp_port_data *data = &dig_port->hdcp_port_data; struct hdcp_port_data *data = &dig_port->hdcp_port_data;
struct intel_hdcp *hdcp = &connector->hdcp;
enum port port = dig_port->base.port; enum port port = dig_port->base.port;
if (DISPLAY_VER(dev_priv) < 12) if (DISPLAY_VER(dev_priv) < 12)
...@@ -2191,9 +2189,6 @@ static int initialize_hdcp_port_data(struct intel_connector *connector, ...@@ -2191,9 +2189,6 @@ static int initialize_hdcp_port_data(struct intel_connector *connector,
drm_err(&dev_priv->drm, "Out of Memory\n"); drm_err(&dev_priv->drm, "Out of Memory\n");
return -ENOMEM; return -ENOMEM;
} }
/* For SST */
data->streams[0].stream_id = 0;
data->streams[0].stream_type = hdcp->content_type;
return 0; return 0;
} }
...@@ -2299,8 +2294,11 @@ intel_hdcp_set_streams(struct intel_digital_port *dig_port, ...@@ -2299,8 +2294,11 @@ intel_hdcp_set_streams(struct intel_digital_port *dig_port,
struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev); struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
struct hdcp_port_data *data = &dig_port->hdcp_port_data; 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; return 0;
}
data->k = 0; data->k = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment