[08/25] drm/i915: Show guilty context name on GPU reset
diff mbox series

Message ID 20191110185806.17413-8-chris@chris-wilson.co.uk
State New
Headers show
Series
  • [01/25] drm/i915: Protect context while grabbing its name for the request
Related show

Commit Message

Chris Wilson Nov. 10, 2019, 6:57 p.m. UTC
We mention that we are resetting the GPU, and dump the device state for
post mortem debugging. However, while that dump contains the active
processes and the one flagged as causing the error, we do not always
include that information in dmesg. Include the name of the guilty
process in dmesg for reference.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Mika Kuoppala Nov. 11, 2019, 11:26 a.m. UTC | #1
Chris Wilson <chris@chris-wilson.co.uk> writes:

> We mention that we are resetting the GPU, and dump the device state for
> post mortem debugging. However, while that dump contains the active
> processes and the one flagged as causing the error, we do not always
> include that information in dmesg. Include the name of the guilty
> process in dmesg for reference.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Stamped the previous one so in here too,

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_reset.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> index a6b0d00c3a51..b7007cd78c6f 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -92,6 +92,10 @@ static bool context_mark_guilty(struct i915_gem_context *ctx)
>  	if (!i915_gem_context_is_bannable(ctx))
>  		return false;
>  
> +	dev_notice(ctx->i915->drm.dev,
> +		   "%s context reset due to GPU hang\n",
> +		   ctx->name);
> +
>  	/* Record the timestamp for the last N hangs */
>  	prev_hang = ctx->hang_timestamp[0];
>  	for (i = 0; i < ARRAY_SIZE(ctx->hang_timestamp) - 1; i++)
> -- 
> 2.24.0

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
index a6b0d00c3a51..b7007cd78c6f 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -92,6 +92,10 @@  static bool context_mark_guilty(struct i915_gem_context *ctx)
 	if (!i915_gem_context_is_bannable(ctx))
 		return false;
 
+	dev_notice(ctx->i915->drm.dev,
+		   "%s context reset due to GPU hang\n",
+		   ctx->name);
+
 	/* Record the timestamp for the last N hangs */
 	prev_hang = ctx->hang_timestamp[0];
 	for (i = 0; i < ARRAY_SIZE(ctx->hang_timestamp) - 1; i++)