diff mbox series

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

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

Commit Message

Anshuman Gupta Jan. 15, 2021, 1:48 p.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.

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

Jani Nikula Jan. 15, 2021, 3:18 p.m. UTC | #1
On Fri, 15 Jan 2021, Anshuman Gupta <anshuman.gupta@intel.com> 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.
>
> 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..f24e2c07bfa6 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -55,6 +55,8 @@ intel_hdcp_required_content_stream(struct intel_digital_port *dig_port)
>  
>  	if (dig_port->hdcp_auth_status)
>  		return 0;
> +	else
> +		data->k = 0;
>  

If you have an early return, the else branch is unnecessary; just do it
at the top level like everything after it.

BR,
Jani.

>  	drm_connector_list_iter_begin(&i915->drm, &conn_iter);
>  	for_each_intel_connector_iter(connector, &conn_iter) {
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..f24e2c07bfa6 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -55,6 +55,8 @@  intel_hdcp_required_content_stream(struct intel_digital_port *dig_port)
 
 	if (dig_port->hdcp_auth_status)
 		return 0;
+	else
+		data->k = 0;
 
 	drm_connector_list_iter_begin(&i915->drm, &conn_iter);
 	for_each_intel_connector_iter(connector, &conn_iter) {