Re: [Intel-gfx] [PATCH 5/7] drm/i915: Show the GPU state when declaring wedged

2018-02-05 Thread Chris Wilson
Quoting Mika Kuoppala (2018-02-05 09:51:42)
> Chris Wilson  writes:
> 
> > Dump each engine state when i915_gem_set_wedged() is called to give us
> > some more clues as to why we had to terminate the GPU.
> >
> > Signed-off-by: Chris Wilson 
> > Cc: Joonas Lahtinen 
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c | 7 +++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c 
> > b/drivers/gpu/drm/i915/i915_gem.c
> > index 6090ef3141be..a11358fd1176 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -3199,6 +3199,13 @@ void i915_gem_set_wedged(struct drm_i915_private 
> > *i915)
> >   struct intel_engine_cs *engine;
> >   enum intel_engine_id id;
> >  
> > + if (drm_debug & DRM_UT_DRIVER) {
> > + struct drm_printer p = drm_debug_printer(__func__);
> > +
> > + for_each_engine(engine, i915, id)
> > + intel_engine_dump(engine, &p, "%s\n", engine->name);
> 
> We have both %s\n and plain %s across the dumps we do across the driver.

Hmm, if (header) drm_vprintf(m, header, &ap); We need those "\n".

Though the whole indentation scheme for intel_engine_dump() needs some
thought and fixing.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 5/7] drm/i915: Show the GPU state when declaring wedged

2018-02-05 Thread Mika Kuoppala
Chris Wilson  writes:

> Dump each engine state when i915_gem_set_wedged() is called to give us
> some more clues as to why we had to terminate the GPU.
>
> Signed-off-by: Chris Wilson 
> Cc: Joonas Lahtinen 
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 7 +++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 6090ef3141be..a11358fd1176 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3199,6 +3199,13 @@ void i915_gem_set_wedged(struct drm_i915_private *i915)
>   struct intel_engine_cs *engine;
>   enum intel_engine_id id;
>  
> + if (drm_debug & DRM_UT_DRIVER) {
> + struct drm_printer p = drm_debug_printer(__func__);
> +
> + for_each_engine(engine, i915, id)
> + intel_engine_dump(engine, &p, "%s\n", engine->name);

We have both %s\n and plain %s across the dumps we do across the driver.

Reviewed-by: Mika Kuoppala 

> + }
> +
>   /*
>* First, stop submission to hw, but do not yet complete requests by
>* rolling the global seqno forward (since this would complete requests
> -- 
> 2.15.1
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 5/7] drm/i915: Show the GPU state when declaring wedged

2018-02-05 Thread Chris Wilson
Dump each engine state when i915_gem_set_wedged() is called to give us
some more clues as to why we had to terminate the GPU.

Signed-off-by: Chris Wilson 
Cc: Joonas Lahtinen 
---
 drivers/gpu/drm/i915/i915_gem.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6090ef3141be..a11358fd1176 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3199,6 +3199,13 @@ void i915_gem_set_wedged(struct drm_i915_private *i915)
struct intel_engine_cs *engine;
enum intel_engine_id id;
 
+   if (drm_debug & DRM_UT_DRIVER) {
+   struct drm_printer p = drm_debug_printer(__func__);
+
+   for_each_engine(engine, i915, id)
+   intel_engine_dump(engine, &p, "%s\n", engine->name);
+   }
+
/*
 * First, stop submission to hw, but do not yet complete requests by
 * rolling the global seqno forward (since this would complete requests
-- 
2.15.1

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