dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Restore HDCP DRM_INFO when with no downstream
@ 2018-01-22 17:55 Sean Paul
  2018-01-30  8:35 ` Daniel Vetter
  2018-01-30  9:24 ` Ramalingam C
  0 siblings, 2 replies; 6+ messages in thread
From: Sean Paul @ 2018-01-22 17:55 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Rodrigo Vivi

The commit below returned earlier than before, but failed to move the
info message when authenticating without downstream devices. This patch
restores the message on authentication success.

Fixes: 87eb3ec818fa ("drm/i915: II stage HDCP auth for repeater only")
Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/i915/intel_hdcp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index db9527173a1e..dd7dffd405d5 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -168,10 +168,8 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
 
 	/* If there are no downstream devices, we're all done. */
 	num_downstream = DRM_HDCP_NUM_DOWNSTREAM(bstatus[0]);
-	if (num_downstream == 0) {
-		DRM_INFO("HDCP is enabled (no downstream devices)\n");
+	if (num_downstream == 0)
 		return 0;
-	}
 
 	ksv_fifo = kzalloc(num_downstream * DRM_HDCP_KSV_LEN, GFP_KERNEL);
 	if (!ksv_fifo)
@@ -502,6 +500,7 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
 	if (repeater_present)
 		return intel_hdcp_auth_downstream(intel_dig_port, shim);
 
+	DRM_INFO("HDCP is enabled (no downstream devices)\n");
 	return 0;
 }
 
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Restore HDCP DRM_INFO when with no downstream
  2018-01-22 17:55 [PATCH] drm/i915: Restore HDCP DRM_INFO when with no downstream Sean Paul
@ 2018-01-30  8:35 ` Daniel Vetter
  2018-01-30 14:23   ` Sean Paul
  2018-01-30  9:24 ` Ramalingam C
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2018-01-30  8:35 UTC (permalink / raw)
  To: Sean Paul; +Cc: intel-gfx, dri-devel, Rodrigo Vivi

On Mon, Jan 22, 2018 at 12:55:00PM -0500, Sean Paul wrote:
> The commit below returned earlier than before, but failed to move the
> info message when authenticating without downstream devices. This patch
> restores the message on authentication success.
> 
> Fixes: 87eb3ec818fa ("drm/i915: II stage HDCP auth for repeater only")
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Signed-off-by: Sean Paul <seanpaul@chromium.org>

DRM_INFO is rather loud (it shows up in dmesg by default), imo better to
bikeshed this to DRM_DEBUG_KMS or similar while at it. Of course would
need to be done for the entire file.

Either way (i.e. if you ignore this, do it in a separate patch, or
combined):

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>


> ---
>  drivers/gpu/drm/i915/intel_hdcp.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> index db9527173a1e..dd7dffd405d5 100644
> --- a/drivers/gpu/drm/i915/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> @@ -168,10 +168,8 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
>  
>  	/* If there are no downstream devices, we're all done. */
>  	num_downstream = DRM_HDCP_NUM_DOWNSTREAM(bstatus[0]);
> -	if (num_downstream == 0) {
> -		DRM_INFO("HDCP is enabled (no downstream devices)\n");
> +	if (num_downstream == 0)
>  		return 0;
> -	}
>  
>  	ksv_fifo = kzalloc(num_downstream * DRM_HDCP_KSV_LEN, GFP_KERNEL);
>  	if (!ksv_fifo)
> @@ -502,6 +500,7 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
>  	if (repeater_present)
>  		return intel_hdcp_auth_downstream(intel_dig_port, shim);
>  
> +	DRM_INFO("HDCP is enabled (no downstream devices)\n");
>  	return 0;
>  }
>  
> -- 
> 2.16.0.rc1.238.g530d649a79-goog
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Restore HDCP DRM_INFO when with no downstream
  2018-01-22 17:55 [PATCH] drm/i915: Restore HDCP DRM_INFO when with no downstream Sean Paul
  2018-01-30  8:35 ` Daniel Vetter
@ 2018-01-30  9:24 ` Ramalingam C
  2018-01-30 14:29   ` [PATCH v2] " Sean Paul
  1 sibling, 1 reply; 6+ messages in thread
From: Ramalingam C @ 2018-01-30  9:24 UTC (permalink / raw)
  To: Sean Paul, dri-devel; +Cc: intel-gfx, Rodrigo Vivi



On Monday 22 January 2018 11:25 PM, Sean Paul wrote:
> The commit below returned earlier than before, but failed to move the
> info message when authenticating without downstream devices. This patch
> restores the message on authentication success.
>
> Fixes: 87eb3ec818fa ("drm/i915: II stage HDCP auth for repeater only")
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
>   drivers/gpu/drm/i915/intel_hdcp.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> index db9527173a1e..dd7dffd405d5 100644
> --- a/drivers/gpu/drm/i915/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> @@ -168,10 +168,8 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
>   
>   	/* If there are no downstream devices, we're all done. */
>   	num_downstream = DRM_HDCP_NUM_DOWNSTREAM(bstatus[0]);
> -	if (num_downstream == 0) {
> -		DRM_INFO("HDCP is enabled (no downstream devices)\n");
> +	if (num_downstream == 0)
>   		return 0;
> -	}
>   
>   	ksv_fifo = kzalloc(num_downstream * DRM_HDCP_KSV_LEN, GFP_KERNEL);
>   	if (!ksv_fifo)
> @@ -502,6 +500,7 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
>   	if (repeater_present)
>   		return intel_hdcp_auth_downstream(intel_dig_port, shim);
>   
> +	DRM_INFO("HDCP is enabled (no downstream devices)\n");
Movement of the message make sense.

This log is for HDCP enabled on receiver. Even repeater might be with no 
downstream devices.
So msg such as "HDCP enabled on Receiver" would be more informative.

--Ram
>   	return 0;
>   }
>   

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Restore HDCP DRM_INFO when with no downstream
  2018-01-30  8:35 ` Daniel Vetter
@ 2018-01-30 14:23   ` Sean Paul
  0 siblings, 0 replies; 6+ messages in thread
From: Sean Paul @ 2018-01-30 14:23 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, dri-devel, Rodrigo Vivi

On Tue, Jan 30, 2018 at 09:35:34AM +0100, Daniel Vetter wrote:
> On Mon, Jan 22, 2018 at 12:55:00PM -0500, Sean Paul wrote:
> > The commit below returned earlier than before, but failed to move the
> > info message when authenticating without downstream devices. This patch
> > restores the message on authentication success.
> > 
> > Fixes: 87eb3ec818fa ("drm/i915: II stage HDCP auth for repeater only")
> > Cc: Ramalingam C <ramalingam.c@intel.com>
> > Cc: Sean Paul <seanpaul@chromium.org>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: intel-gfx@lists.freedesktop.org
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
> 
> DRM_INFO is rather loud (it shows up in dmesg by default), imo better to
> bikeshed this to DRM_DEBUG_KMS or similar while at it. Of course would
> need to be done for the entire file.
> 

Yeah, I figured I would get this feedback when I chose INFO :-). So in my
defense, HDCP is enabled/disabled quite infrequently and very likely never
in most distros. Further, it's really nice to know whether something went
sideways while HDCP was enabled, or perhaps corresponding to enable/disable.

All said, if this is distruptive upstream, we can carry a s/DEBUG_KMS/INFO/
patch downstream.

> Either way (i.e. if you ignore this, do it in a separate patch, or
> combined):
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

As always, thank you for your review!

Sean

> 
> 
> > ---
> >  drivers/gpu/drm/i915/intel_hdcp.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> > index db9527173a1e..dd7dffd405d5 100644
> > --- a/drivers/gpu/drm/i915/intel_hdcp.c
> > +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> > @@ -168,10 +168,8 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
> >  
> >  	/* If there are no downstream devices, we're all done. */
> >  	num_downstream = DRM_HDCP_NUM_DOWNSTREAM(bstatus[0]);
> > -	if (num_downstream == 0) {
> > -		DRM_INFO("HDCP is enabled (no downstream devices)\n");
> > +	if (num_downstream == 0)
> >  		return 0;
> > -	}
> >  
> >  	ksv_fifo = kzalloc(num_downstream * DRM_HDCP_KSV_LEN, GFP_KERNEL);
> >  	if (!ksv_fifo)
> > @@ -502,6 +500,7 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
> >  	if (repeater_present)
> >  		return intel_hdcp_auth_downstream(intel_dig_port, shim);
> >  
> > +	DRM_INFO("HDCP is enabled (no downstream devices)\n");
> >  	return 0;
> >  }
> >  
> > -- 
> > 2.16.0.rc1.238.g530d649a79-goog
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] drm/i915: Restore HDCP DRM_INFO when with no downstream
  2018-01-30  9:24 ` Ramalingam C
@ 2018-01-30 14:29   ` Sean Paul
  2018-01-30 16:01     ` Sean Paul
  0 siblings, 1 reply; 6+ messages in thread
From: Sean Paul @ 2018-01-30 14:29 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Rodrigo Vivi

The commit below returned earlier than before, but failed to move the
info message when authenticating without downstream devices. This patch
restores the message on authentication success.

Changes in v2:
- s/no downstream devices/no repeater present/ (Ram)

Fixes: 87eb3ec818fa ("drm/i915: II stage HDCP auth for repeater only")
Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/i915/intel_hdcp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index db9527173a1e..9fc9da030514 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -168,10 +168,8 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
 
 	/* If there are no downstream devices, we're all done. */
 	num_downstream = DRM_HDCP_NUM_DOWNSTREAM(bstatus[0]);
-	if (num_downstream == 0) {
-		DRM_INFO("HDCP is enabled (no downstream devices)\n");
+	if (num_downstream == 0)
 		return 0;
-	}
 
 	ksv_fifo = kzalloc(num_downstream * DRM_HDCP_KSV_LEN, GFP_KERNEL);
 	if (!ksv_fifo)
@@ -502,6 +500,7 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
 	if (repeater_present)
 		return intel_hdcp_auth_downstream(intel_dig_port, shim);
 
+	DRM_INFO("HDCP is enabled (no repeater present)\n");
 	return 0;
 }
 
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/i915: Restore HDCP DRM_INFO when with no downstream
  2018-01-30 14:29   ` [PATCH v2] " Sean Paul
@ 2018-01-30 16:01     ` Sean Paul
  0 siblings, 0 replies; 6+ messages in thread
From: Sean Paul @ 2018-01-30 16:01 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Rodrigo Vivi

On Tue, Jan 30, 2018 at 09:29:34AM -0500, Sean Paul wrote:
> The commit below returned earlier than before, but failed to move the
> info message when authenticating without downstream devices. This patch
> restores the message on authentication success.
> 
> Changes in v2:
> - s/no downstream devices/no repeater present/ (Ram)
> 
> Fixes: 87eb3ec818fa ("drm/i915: II stage HDCP auth for repeater only")
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>

Applied to the topic branch

> ---
>  drivers/gpu/drm/i915/intel_hdcp.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> index db9527173a1e..9fc9da030514 100644
> --- a/drivers/gpu/drm/i915/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> @@ -168,10 +168,8 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
>  
>  	/* If there are no downstream devices, we're all done. */
>  	num_downstream = DRM_HDCP_NUM_DOWNSTREAM(bstatus[0]);
> -	if (num_downstream == 0) {
> -		DRM_INFO("HDCP is enabled (no downstream devices)\n");
> +	if (num_downstream == 0)
>  		return 0;
> -	}
>  
>  	ksv_fifo = kzalloc(num_downstream * DRM_HDCP_KSV_LEN, GFP_KERNEL);
>  	if (!ksv_fifo)
> @@ -502,6 +500,7 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
>  	if (repeater_present)
>  		return intel_hdcp_auth_downstream(intel_dig_port, shim);
>  
> +	DRM_INFO("HDCP is enabled (no repeater present)\n");
>  	return 0;
>  }
>  
> -- 
> 2.16.0.rc1.238.g530d649a79-goog
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-30 16:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 17:55 [PATCH] drm/i915: Restore HDCP DRM_INFO when with no downstream Sean Paul
2018-01-30  8:35 ` Daniel Vetter
2018-01-30 14:23   ` Sean Paul
2018-01-30  9:24 ` Ramalingam C
2018-01-30 14:29   ` [PATCH v2] " Sean Paul
2018-01-30 16:01     ` Sean Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).