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: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v5] drm/i915: Tune down init error message due to failure injection
Date: Fri, 18 Mar 2016 10:16:28 +0200	[thread overview]
Message-ID: <1458288988.30170.12.camel@intel.com> (raw)
In-Reply-To: <20160318075836.GL14143@nuc-i3427.alporthouse.com>

On Fri, 2016-03-18 at 07:58 +0000, Chris Wilson wrote:
> On Fri, Mar 18, 2016 at 08:50:37AM +0200, Imre Deak wrote:
> > Atm, in case failure injection forces an error the subsequent "*ERROR*
> > failed to init modeset" error message will make automated tests (CI)
> > report this event as a breakage even though the event is expected. To
> > fix this print the error message with debug log level in this case.
> > 
> > While at it print the error message for any init failure and change it
> > to
> > """
> > Device initialization failed (errno)
> > Please file a bug at https://bugs.freedesktop.org/enter_bug.cgi?product=DRI
> > against DRM/Intel providing the dmesg log by booting with drm.debug=0xf
> > """
> > and export a helper printing error messages using this same format.
> > A follow-up patch will convert all uses of DRM_ERROR reporting a user
> > facing problem to use this new helper instead.
> > 
> > v2:
> > - Include the problematic error message in the commit log, add a
> >   request to file an fdo bug to the message (Chris)
> > v3:
> > - Include the new error message too in the commit log, make the
> >   fdo link more precise and print part of the message with info log
> >   level (Chris)
> > v4: (Chris)
> > - Use dev_printk instead of DRM_ERROR/INFO and use NOTICE instead of
> >   INFO loglevel
> > - Export a helper for printing user facing error messages
> > v5:
> > - Keep the DRM_ERROR message prefix used by piglit-igt/CI to filter
> >   relevant dmesg lines
> > - Use dev_notice(), instead of dev_printk(KERN_NOTICE,...)
> > 
> > CC: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_dma.c | 48 ++++++++++++++++++++++++++++++++++++-----
> >  drivers/gpu/drm/i915/i915_drv.h |  7 ++++++
> >  2 files changed, 50 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> > index 68592b0..096dc35 100644
> > --- a/drivers/gpu/drm/i915/i915_dma.c
> > +++ b/drivers/gpu/drm/i915/i915_dma.c
> > @@ -66,6 +66,44 @@ bool __i915_inject_load_failure(const char *func, int line)
> >  	return false;
> >  }
> >  
> > +#define FDO_BUG_URL "https://bugs.freedesktop.org/enter_bug.cgi?product=DRI"
> > +#define FDO_BUG_MSG "Please file a bug at " FDO_BUG_URL " against DRM/Intel " \
> > +		    "providing the dmesg log by booting with drm.debug=0xf"
> > +
> > +void
> > +__i915_printk(struct drm_i915_private *dev_priv, const char *level,
> > +	      const char *fmt, ...)
> > +{
> 
> static int shown_bug_once;
> 
> > +	struct device *dev = dev_priv->dev->dev;
> > +	bool is_error = level[1] <= KERN_ERR[1];
> > +	struct va_format vaf;
> > +	va_list args;
> > +
> > +	va_start(args, fmt);
> > +
> > +	vaf.fmt = fmt;
> > +	vaf.va = &args;
> > +
> > +	dev_printk(level, dev, "[" DRM_NAME ":%ps] %pV",
> > +		   __builtin_return_address(0), &vaf);
> 
> Also on my wishlist is to
> #undef DRM_NAME
> #define DRM_NAME "drm/i915"
> in i915_drv.h
> 
> Don't tell me that would break CI!

The current regex it uses on all messages with a loglevel <=
KERN_NOTICE:
(\[drm:|drm_|intel_|i915_)

Probably could be changed to 'i915 0000:00:02.0:' if we converted all
user facing DRM_ERRORs to use the new helper. Btw, according to your
plan the rest non-user facing DRM_ERRORs would be printed with debug
log level I assume, so isn't it a problem that they won't be treated as
test failures by CI?

> > +	if (is_error)
> 
> if (is_error && !shown_bug_once) {
> > +		dev_notice(dev, "%s", FDO_BUG_MSG);
> shown_bug_once = 1;
> }

Ok, will respin it.

--Imre

> 
> With just showing the bug once,
> Reviwed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-03-18  8:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 14:42 [PATCH] drm/i915: Tune down init error message due to failure injection Imre Deak
2016-03-17 15:12 ` Chris Wilson
2016-03-17 15:46 ` [PATCH v2] " Imre Deak
2016-03-17 15:55   ` Chris Wilson
2016-03-17 16:08     ` Imre Deak
2016-03-17 19:41       ` Chris Wilson
2016-03-17 19:50         ` Imre Deak
2016-03-17 20:44           ` Chris Wilson
2016-03-17 20:53             ` Imre Deak
2016-03-17 21:03               ` Chris Wilson
2016-03-17 21:10                 ` Imre Deak
2016-03-17 21:48                   ` Chris Wilson
2016-03-17 22:09                     ` Imre Deak
2016-03-17 22:14                       ` Chris Wilson
2016-03-17 22:18                         ` Imre Deak
2016-03-18  8:59                           ` Joonas Lahtinen
2016-03-18  9:15                             ` Imre Deak
2016-03-21  9:28                               ` Daniel Vetter
2016-03-21 15:12                                 ` Imre Deak
2016-03-24 13:11                                   ` Joonas Lahtinen
2016-03-29  9:26                                     ` Daniel Vetter
2016-03-18  9:26                             ` Chris Wilson
2016-03-17 16:36   ` [PATCH v3] " Imre Deak
2016-03-18  1:09     ` [PATCH v4] " Imre Deak
2016-03-18  6:50       ` [PATCH v5] " Imre Deak
2016-03-18  7:58         ` Chris Wilson
2016-03-18  8:16           ` Imre Deak [this message]
2016-03-18  8:23             ` Chris Wilson
2016-03-18  8:46         ` [PATCH v6] " Imre Deak
2016-03-18 12:38 ` ✗ Fi.CI.BAT: failure for drm/i915: Tune down init error message due to failure injection (rev6) Patchwork
2016-03-18 13:29   ` Imre Deak
2016-03-18 13:42     ` Imre Deak

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=1458288988.30170.12.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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.