All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Make __i915_printk debug output behave the same as DRM_DEBUG_DRIVER
Date: Tue, 22 Mar 2016 12:22:37 +0200	[thread overview]
Message-ID: <1458642157.20080.18.camel@intel.com> (raw)
In-Reply-To: <20160322094248.GS21717@nuc-i3427.alporthouse.com>

On ti, 2016-03-22 at 09:42 +0000, Chris Wilson wrote:
> 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@linux.intel.com>
> > CC: Daniel Vetter <daniel.vetter@ffwll.ch>
> > CC: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >  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.

It's also used by failure injection. But yes, I agree that in the
future a more generic mapping from DRM debug mask to dynamic debug
filtering could be used instead of this (also considered already by
Joonas and Daniel).

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

Thanks,
Imre

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

      reply	other threads:[~2016-03-22 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 15:08 [PATCH] drm/i915: Make __i915_printk debug output behave the same as DRM_DEBUG_DRIVER Imre Deak
2016-03-22  8:04 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-03-22 13:19   ` Imre Deak
2016-03-22  9:42 ` [PATCH] " Chris Wilson
2016-03-22 10:22   ` Imre Deak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458642157.20080.18.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.