diff mbox

drm/i915: Tune down init error message due to failure injection

Message ID 1458225732-11731-1-git-send-email-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak March 17, 2016, 2:42 p.m. UTC
Atm, in case failure injection forces an error a subsequent error
messages 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 for
consistency.

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

Comments

Chris Wilson March 17, 2016, 3:12 p.m. UTC | #1
On Thu, Mar 17, 2016 at 04:42:12PM +0200, Imre Deak wrote:
> Atm, in case failure injection forces an error a subsequent error
> messages 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 for
> consistency.
> 
> CC: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_dma.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 68592b0..d107871 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -66,6 +66,14 @@ bool __i915_inject_load_failure(const char *func, int line)
>  	return false;
>  }
>  
> +#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__);				\
> +} while(0)
> +
>  static int i915_getparam(struct drm_device *dev, void *data,
>  			 struct drm_file *file_priv)
>  {
> @@ -1332,10 +1340,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 +1363,8 @@ out_runtime_pm_put:
>  out_free_priv:
>  	kfree(dev_priv);
>  
> +	i915_load_error("device initialization failed (%d)\n", ret);

Please put a representative sample output into the changelog.

I think we should include a request to file bug with full drm.debug=0xf.
-Chris
Imre Deak March 18, 2016, 1:29 p.m. UTC | #2
On Fri, 2016-03-18 at 12:38 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Tune down init error message due to failure
> injection (rev6)
> URL   : https://patchwork.freedesktop.org/series/4577/
> State : failure
> 
> == Summary ==
> 
> Series 4577v6 drm/i915: Tune down init error message due to failure
> injection
> http://patchwork.freedesktop.org/api/1.0/series/4577/revisions/6/mbox
> /
> 
> Test drv_module_reload_basic:
>                 dmesg-warn -> PASS       (bsw-nuc-2)
>                 dmesg-warn -> PASS       (skl-i5k-2)
>                 dmesg-warn -> PASS       (skl-nuci5)
>                 dmesg-warn -> PASS       (hsw-gt2)
>                 dmesg-warn -> PASS       (bdw-ultra)
>                 dmesg-warn -> PASS       (skl-i7k-2)
>                 dmesg-warn -> PASS       (ivb-t430s)
>                 dmesg-warn -> PASS       (snb-dellxps)
>                 dmesg-warn -> PASS       (hsw-brixbox)
>                 dmesg-warn -> PASS       (bdw-nuci7)
>                 dmesg-warn -> PASS       (ilk-hp8440p)
> Test gem_mmap_gtt:
>         Subgroup basic-write-gtt-no-prefault:
>                 dmesg-warn -> PASS       (bsw-nuc-2)
> Test kms_flip:
>         Subgroup basic-flip-vs-wf_vblank:
>                 pass       -> FAIL       (bsw-nuc-2)
1 frame long inter-flip ts jitter with seq-step=1:
https://bugs.freedesktop.org/show_bug.cgi?id=94294

>                 pass       -> DMESG-WARN (hsw-gt2)
Device suspended during WM programming:
https://bugs.freedesktop.org/show_bug.cgi?id=94349

>                 dmesg-warn -> PASS       (hsw-brixbox)
> Test kms_pipe_crc_basic:
>         Subgroup suspend-read-crc-pipe-c:
>                 pass       -> DMESG-WARN (bsw-nuc-2)
CPU hotplug lockdep WARN during GGTT programming:
https://bugs.freedesktop.org/show_bug.cgi?id=94350

> Test pm_rpm:
>         Subgroup basic-pci-d3-state:
>                 pass       -> DMESG-WARN (bsw-nuc-2)
Unclaimed reg access prior to suspending:
https://bugs.freedesktop.org/show_bug.cgi?id=94164

>         Subgroup basic-rte:
>                 dmesg-warn -> PASS       (bsw-nuc-2)
>                 pass       -> DMESG-WARN (snb-dellxps)
Device suspended during WM programming:
https://bugs.freedesktop.org/show_bug.cgi?id=94349

> 
> bdw-
> nuci7        total:194  pass:182  dwarn:0   dfail:0   fail:0   skip:1
> 2 
> bdw-
> ultra        total:194  pass:173  dwarn:0   dfail:0   fail:0   skip:2
> 1 
> bsw-nuc-
> 2        total:194  pass:154  dwarn:2   dfail:0   fail:1   skip:37 
> byt-
> nuc          total:194  pass:155  dwarn:4   dfail:0   fail:0   skip:3
> 5 
> hsw-
> brixbox      total:194  pass:171  dwarn:1   dfail:0   fail:0   skip:2
> 2 
> hsw-
> gt2          total:194  pass:176  dwarn:1   dfail:0   fail:0   skip:1
> 7 
> ilk-
> hp8440p      total:194  pass:131  dwarn:0   dfail:0   fail:0   skip:6
> 3 
> ivb-
> t430s        total:194  pass:169  dwarn:0   dfail:0   fail:0   skip:2
> 5 
> skl-i5k-
> 2        total:194  pass:171  dwarn:0   dfail:0   fail:0   skip:23 
> skl-i7k-
> 2        total:194  pass:171  dwarn:0   dfail:0   fail:0   skip:23 
> skl-
> nuci5        total:194  pass:183  dwarn:0   dfail:0   fail:0   skip:1
> 1 
> snb-
> dellxps      total:194  pass:158  dwarn:2   dfail:0   fail:0   skip:3
> 4 
> 
> Results at /archive/results/CI_IGT_test/Patchwork_1642/
> 
> 851d270da650c16883e87bdaad7ca8b37ccbdea3 drm-intel-nightly: 2016y-
> 03m-18d-11h-13m-55s UTC integration manifest
> e8243dad16bc7ad17f08c3cacf270e3d6e551825 drm/i915: Tune down init
> error message due to failure injection
>
Imre Deak March 18, 2016, 1:42 p.m. UTC | #3
On Fri, 2016-03-18 at 15:29 +0200, Imre Deak wrote:
> On Fri, 2016-03-18 at 12:38 +0000, Patchwork wrote:
> > == Series Details ==
> > 
> > Series: drm/i915: Tune down init error message due to failure
> > injection (rev6)
> > URL   : https://patchwork.freedesktop.org/series/4577/
> > State : failure
> > 
> > == Summary ==
> > 
> > Series 4577v6 drm/i915: Tune down init error message due to failure
> > injection
> > http://patchwork.freedesktop.org/api/1.0/series/4577/revisions/6/mb
> > ox
> > /
> > 
> > Test drv_module_reload_basic:
> >                 dmesg-warn -> PASS       (bsw-nuc-2)
> >                 dmesg-warn -> PASS       (skl-i5k-2)
> >                 dmesg-warn -> PASS       (skl-nuci5)
> >                 dmesg-warn -> PASS       (hsw-gt2)
> >                 dmesg-warn -> PASS       (bdw-ultra)
> >                 dmesg-warn -> PASS       (skl-i7k-2)
> >                 dmesg-warn -> PASS       (ivb-t430s)
> >                 dmesg-warn -> PASS       (snb-dellxps)
> >                 dmesg-warn -> PASS       (hsw-brixbox)
> >                 dmesg-warn -> PASS       (bdw-nuci7)
> >                 dmesg-warn -> PASS       (ilk-hp8440p)
> > Test gem_mmap_gtt:
> >         Subgroup basic-write-gtt-no-prefault:
> >                 dmesg-warn -> PASS       (bsw-nuc-2)
> > Test kms_flip:
> >         Subgroup basic-flip-vs-wf_vblank:
> >                 pass       -> FAIL       (bsw-nuc-2)
> 1 frame long inter-flip ts jitter with seq-step=1:
> https://bugs.freedesktop.org/show_bug.cgi?id=94294
> 
> >                 pass       -> DMESG-WARN (hsw-gt2)
> Device suspended during WM programming:
> https://bugs.freedesktop.org/show_bug.cgi?id=94349
> 
> >                 dmesg-warn -> PASS       (hsw-brixbox)
> > Test kms_pipe_crc_basic:
> >         Subgroup suspend-read-crc-pipe-c:
> >                 pass       -> DMESG-WARN (bsw-nuc-2)
> CPU hotplug lockdep WARN during GGTT programming:
> https://bugs.freedesktop.org/show_bug.cgi?id=94350
> 
> > Test pm_rpm:
> >         Subgroup basic-pci-d3-state:
> >                 pass       -> DMESG-WARN (bsw-nuc-2)
> Unclaimed reg access prior to suspending:
> https://bugs.freedesktop.org/show_bug.cgi?id=94164
> 
> >         Subgroup basic-rte:
> >                 dmesg-warn -> PASS       (bsw-nuc-2)
> >                 pass       -> DMESG-WARN (snb-dellxps)
> Device suspended during WM programming:
> https://bugs.freedesktop.org/show_bug.cgi?id=94349

I pushed the patch to -dinq, thanks for the review.

--Imre
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 68592b0..d107871 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -66,6 +66,14 @@  bool __i915_inject_load_failure(const char *func, int line)
 	return false;
 }
 
+#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__);				\
+} while(0)
+
 static int i915_getparam(struct drm_device *dev, void *data,
 			 struct drm_file *file_priv)
 {
@@ -1332,10 +1340,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 +1363,8 @@  out_runtime_pm_put:
 out_free_priv:
 	kfree(dev_priv);
 
+	i915_load_error("device initialization failed (%d)\n", ret);
+
 	return ret;
 }