diff mbox series

[v2,1/2] drm/i915/hdcp: Fix WARN_ON(data->k > INTEL_NUM_PIPES)

Message ID 20210119064655.1605-2-anshuman.gupta@intel.com (mailing list archive)
State New, archived
Headers show
Series HDCP misc fixes | expand

Commit Message

Anshuman Gupta Jan. 19, 2021, 6:46 a.m. UTC
Initialize no. of streams transmitted on a port to zero
such that intel_hdcp_required_content_stream() can
prepared the content stream after subsequemt attmept to
enable hdcp after a HDCP failure.

v2:
- Initialize k at top level instead of else branch. [Jani]

Cc: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdcp.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Nautiyal, Ankit K Jan. 22, 2021, 8:48 a.m. UTC | #1
Looks good to me.

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

On 1/19/2021 12:16 PM, Anshuman Gupta wrote:
> Initialize no. of streams transmitted on a port to zero
> such that intel_hdcp_required_content_stream() can
> prepared the content stream after subsequemt attmept to
> enable hdcp after a HDCP failure.
>
> v2:
> - Initialize k at top level instead of else branch. [Jani]
>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_hdcp.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index db8dff2eeb0a..581ccb038b87 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -53,6 +53,8 @@ intel_hdcp_required_content_stream(struct intel_digital_port *dig_port)
>   	bool enforce_type0 = false;
>   	int k;
>   
> +	data->k = 0;
> +
>   	if (dig_port->hdcp_auth_status)
>   		return 0;
>
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 db8dff2eeb0a..581ccb038b87 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -53,6 +53,8 @@  intel_hdcp_required_content_stream(struct intel_digital_port *dig_port)
 	bool enforce_type0 = false;
 	int k;
 
+	data->k = 0;
+
 	if (dig_port->hdcp_auth_status)
 		return 0;