Re: [PATCH] drm/i915: Make __i915_printk debug output behave the same as DRM_DEBUG_DRIVER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 21, 2016 at 05:08:57PM +0200, Imre Deak wrote:
> Joonas and Daniel remarked that our debugging output should stay compatible
> with the core DRM's debug facility. The recently added __i915_printk() would
> output debug messages even if debugging is completely disabled via the
> drm.debug option. To fix this make __i915_printk behave the same as
> DRM_DEBUG_DRIVER in this case.
> 
> CC: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> CC: Daniel Vetter <daniel.vetter@xxxxxxxx>
> CC: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_dma.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 3f439a0..a3458fc 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -77,9 +77,13 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
>  	static bool shown_bug_once;
>  	struct device *dev = dev_priv->dev->dev;
>  	bool is_error = level[1] <= KERN_ERR[1];
> +	bool is_debug = level[1] == KERN_DEBUG[1];
>  	struct va_format vaf;
>  	va_list args;
>  
> +	if (is_debug && !(drm_debug & DRM_UT_DRIVER))
> +		return;

This feels overly restrictive for __i915_printk. It makes sense for
report_error, but that is already KERN_ERR only.

>From the point-of-view that we are documenting what needs to be done in
future,
Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux