All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Make hpd debug messages less cryptic
@ 2014-08-11 15:37 ville.syrjala
  2014-08-11 17:05 ` Damien Lespiau
  0 siblings, 1 reply; 3+ messages in thread
From: ville.syrjala @ 2014-08-11 15:37 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Don't print raw numbers, use port_name() and tell the user whether it's
long or short without having to figure out what the other magic number
means.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 4 +++-
 drivers/gpu/drm/i915/intel_dp.c | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 8e6729e..4a86fc5 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1777,7 +1777,9 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev,
 				long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT;
 			}
 
-			DRM_DEBUG_DRIVER("digital hpd port %d %d\n", port, long_hpd);
+			DRM_DEBUG_DRIVER("digital hpd port %c - %s\n",
+					 port_name(port),
+					 long_hpd ? "long" : "short");
 			/* for long HPD pulses we want to have the digital queue happen,
 			   but we still want HPD storm detection to function. */
 			if (long_hpd) {
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 34e3c47..e5ada4f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4043,7 +4043,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
 	if (intel_dig_port->base.type != INTEL_OUTPUT_EDP)
 		intel_dig_port->base.type = INTEL_OUTPUT_DISPLAYPORT;
 
-	DRM_DEBUG_KMS("got hpd irq on port %d - %s\n", intel_dig_port->port,
+	DRM_DEBUG_KMS("got hpd irq on port %c - %s\n",
+		      port_name(intel_dig_port->port),
 		      long_hpd ? "long" : "short");
 
 	if (long_hpd) {
-- 
1.8.5.5

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

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

* Re: [PATCH] drm/i915: Make hpd debug messages less cryptic
  2014-08-11 15:37 [PATCH] drm/i915: Make hpd debug messages less cryptic ville.syrjala
@ 2014-08-11 17:05 ` Damien Lespiau
  2014-08-11 17:32   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Lespiau @ 2014-08-11 17:05 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

On Mon, Aug 11, 2014 at 06:37:37PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Don't print raw numbers, use port_name() and tell the user whether it's
> long or short without having to figure out what the other magic number
> means.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>

-- 
Damien

> ---
>  drivers/gpu/drm/i915/i915_irq.c | 4 +++-
>  drivers/gpu/drm/i915/intel_dp.c | 3 ++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 8e6729e..4a86fc5 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1777,7 +1777,9 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev,
>  				long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT;
>  			}
>  
> -			DRM_DEBUG_DRIVER("digital hpd port %d %d\n", port, long_hpd);
> +			DRM_DEBUG_DRIVER("digital hpd port %c - %s\n",
> +					 port_name(port),
> +					 long_hpd ? "long" : "short");
>  			/* for long HPD pulses we want to have the digital queue happen,
>  			   but we still want HPD storm detection to function. */
>  			if (long_hpd) {
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 34e3c47..e5ada4f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4043,7 +4043,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
>  	if (intel_dig_port->base.type != INTEL_OUTPUT_EDP)
>  		intel_dig_port->base.type = INTEL_OUTPUT_DISPLAYPORT;
>  
> -	DRM_DEBUG_KMS("got hpd irq on port %d - %s\n", intel_dig_port->port,
> +	DRM_DEBUG_KMS("got hpd irq on port %c - %s\n",
> +		      port_name(intel_dig_port->port),
>  		      long_hpd ? "long" : "short");
>  
>  	if (long_hpd) {
> -- 
> 1.8.5.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Make hpd debug messages less cryptic
  2014-08-11 17:05 ` Damien Lespiau
@ 2014-08-11 17:32   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-08-11 17:32 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Mon, Aug 11, 2014 at 06:05:24PM +0100, Damien Lespiau wrote:
> On Mon, Aug 11, 2014 at 06:37:37PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Don't print raw numbers, use port_name() and tell the user whether it's
> > long or short without having to figure out what the other magic number
> > means.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> 
> -- 
> Damien
> 
> > ---
> >  drivers/gpu/drm/i915/i915_irq.c | 4 +++-
> >  drivers/gpu/drm/i915/intel_dp.c | 3 ++-
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index 8e6729e..4a86fc5 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -1777,7 +1777,9 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev,
> >  				long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT;
> >  			}
> >  
> > -			DRM_DEBUG_DRIVER("digital hpd port %d %d\n", port, long_hpd);
> > +			DRM_DEBUG_DRIVER("digital hpd port %c - %s\n",
> > +					 port_name(port),
> > +					 long_hpd ? "long" : "short");
> >  			/* for long HPD pulses we want to have the digital queue happen,
> >  			   but we still want HPD storm detection to function. */
> >  			if (long_hpd) {
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 34e3c47..e5ada4f 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -4043,7 +4043,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
> >  	if (intel_dig_port->base.type != INTEL_OUTPUT_EDP)
> >  		intel_dig_port->base.type = INTEL_OUTPUT_DISPLAYPORT;
> >  
> > -	DRM_DEBUG_KMS("got hpd irq on port %d - %s\n", intel_dig_port->port,
> > +	DRM_DEBUG_KMS("got hpd irq on port %c - %s\n",
> > +		      port_name(intel_dig_port->port),
> >  		      long_hpd ? "long" : "short");
> >  
> >  	if (long_hpd) {
> > -- 
> > 1.8.5.5
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2014-08-11 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-11 15:37 [PATCH] drm/i915: Make hpd debug messages less cryptic ville.syrjala
2014-08-11 17:05 ` Damien Lespiau
2014-08-11 17:32   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.