All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v3] drm/i915: Tune down init error message due to failure injection
Date: Thu, 17 Mar 2016 18:36:39 +0200	[thread overview]
Message-ID: <1458232599-20677-1-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1458229571-15123-1-git-send-email-imre.deak@intel.com>

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 "*ERROR* Device initialization failed (errno)" for consistency.

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)

CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_dma.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 68592b0..4ae16fb 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -66,6 +66,19 @@ bool __i915_inject_load_failure(const char *func, int line)
 	return false;
 }
 
+#define BUGS_FDO_URL "https://bugs.freedesktop.org/enter_bug.cgi?product=DRI"
+#define i915_load_error(fmt, ...) do {					\
+	if (i915.inject_load_failure &&					\
+	    i915_load_fail_count == i915.inject_load_failure) {		\
+		DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__);			\
+	} else {							\
+		DRM_ERROR(fmt, ##__VA_ARGS__);				\
+		DRM_INFO("Please file a bug at " BUGS_FDO_URL " "	\
+			 "against DRM/Intel providing the dmesg log "	\
+			 "by booting with drm.debug=0xf\n");		\
+	}								\
+} while(0)
+
 static int i915_getparam(struct drm_device *dev, void *data,
 			 struct drm_file *file_priv)
 {
@@ -1332,10 +1345,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 	}
 
 	ret = i915_load_modeset_init(dev);
-	if (ret < 0) {
-		DRM_ERROR("failed to init modeset\n");
+	if (ret < 0)
 		goto out_cleanup_vblank;
-	}
 
 	i915_driver_register(dev_priv);
 
@@ -1357,6 +1368,8 @@ out_runtime_pm_put:
 out_free_priv:
 	kfree(dev_priv);
 
+	i915_load_error("Device initialization failed (%d)\n", ret);
+
 	return ret;
 }
 
-- 
2.5.0

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

  parent reply	other threads:[~2016-03-17 16:36 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   ` Imre Deak [this message]
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
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=1458232599-20677-1-git-send-email-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --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.