All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH 3/4] drm/i915/gt: Include reset failures in the trace
Date: Fri, 04 Dec 2020 15:59:23 +0200	[thread overview]
Message-ID: <87a6ut3c5g.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20201203081616.1645-3-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> The GT and engine reset failures are completely invisible when looking at
> a trace for a bug, but are vital to understanding the incomplete flow.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

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

> ---
>  drivers/gpu/drm/i915/gt/intel_reset.c | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> index 3654c955e6be..000d63588e9e 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -231,7 +231,7 @@ static int g4x_do_reset(struct intel_gt *gt,
>  			      GRDOM_MEDIA | GRDOM_RESET_ENABLE);
>  	ret =  wait_for_atomic(g4x_reset_complete(pdev), 50);
>  	if (ret) {
> -		drm_dbg(&gt->i915->drm, "Wait for media reset failed\n");
> +		GT_TRACE(gt, "Wait for media reset failed\n");
>  		goto out;
>  	}
>  
> @@ -239,7 +239,7 @@ static int g4x_do_reset(struct intel_gt *gt,
>  			      GRDOM_RENDER | GRDOM_RESET_ENABLE);
>  	ret =  wait_for_atomic(g4x_reset_complete(pdev), 50);
>  	if (ret) {
> -		drm_dbg(&gt->i915->drm, "Wait for render reset failed\n");
> +		GT_TRACE(gt, "Wait for render reset failed\n");
>  		goto out;
>  	}
>  
> @@ -265,7 +265,7 @@ static int ilk_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask,
>  					   5000, 0,
>  					   NULL);
>  	if (ret) {
> -		drm_dbg(&gt->i915->drm, "Wait for render reset failed\n");
> +		GT_TRACE(gt, "Wait for render reset failed\n");
>  		goto out;
>  	}
>  
> @@ -276,7 +276,7 @@ static int ilk_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask,
>  					   5000, 0,
>  					   NULL);
>  	if (ret) {
> -		drm_dbg(&gt->i915->drm, "Wait for media reset failed\n");
> +		GT_TRACE(gt, "Wait for media reset failed\n");
>  		goto out;
>  	}
>  
> @@ -305,9 +305,9 @@ static int gen6_hw_domain_reset(struct intel_gt *gt, u32 hw_domain_mask)
>  					   500, 0,
>  					   NULL);
>  	if (err)
> -		drm_dbg(&gt->i915->drm,
> -			"Wait for 0x%08x engines reset failed\n",
> -			hw_domain_mask);
> +		GT_TRACE(gt,
> +			 "Wait for 0x%08x engines reset failed\n",
> +			 hw_domain_mask);
>  
>  	return err;
>  }
> @@ -407,8 +407,7 @@ static int gen11_lock_sfc(struct intel_engine_cs *engine, u32 *hw_mask)
>  		return 0;
>  
>  	if (ret) {
> -		drm_dbg(&engine->i915->drm,
> -			"Wait for SFC forced lock ack failed\n");
> +		ENGINE_TRACE(engine, "Wait for SFC forced lock ack failed\n");
>  		return ret;
>  	}
>  
> @@ -1148,8 +1147,7 @@ int intel_engine_reset(struct intel_engine_cs *engine, const char *msg)
>  		ret = intel_guc_reset_engine(&engine->gt->uc.guc, engine);
>  	if (ret) {
>  		/* If we fail here, we expect to fallback to a global reset */
> -		drm_dbg(&gt->i915->drm, "%sFailed to reset %s, ret=%d\n",
> -			uses_guc ? "GuC " : "", engine->name, ret);
> +		ENGINE_TRACE(engine, "Failed to reset, err: %d\n", ret);
>  		goto out;
>  	}
>  
> @@ -1186,7 +1184,7 @@ static void intel_gt_reset_global(struct intel_gt *gt,
>  
>  	kobject_uevent_env(kobj, KOBJ_CHANGE, error_event);
>  
> -	drm_dbg(&gt->i915->drm, "resetting chip, engines=%x\n", engine_mask);
> +	GT_TRACE(gt, "resetting chip, engines=%x\n", engine_mask);
>  	kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
>  
>  	/* Use a watchdog to ensure that our reset completes */
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-12-04 14:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03  8:16 [Intel-gfx] [PATCH 1/4] drm/i915/gt: Ignore repeated attempts to suspend request flow across reset Chris Wilson
2020-12-03  8:16 ` [Intel-gfx] [PATCH 2/4] drm/i915/gt: Cancel the preemption timeout on responding to it Chris Wilson
2020-12-03  8:16 ` [Intel-gfx] [PATCH 3/4] drm/i915/gt: Include reset failures in the trace Chris Wilson
2020-12-04 13:59   ` Mika Kuoppala [this message]
2020-12-03  8:16 ` [Intel-gfx] [PATCH 4/4] drm/i915/gt: Clear the execlists timers upon reset Chris Wilson
2020-12-04 13:58   ` Mika Kuoppala
2020-12-03  8:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915/gt: Ignore repeated attempts to suspend request flow across reset Patchwork
2020-12-03  8:28 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-12-03  8:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-12-03 11:21 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-12-03 13:49 ` [Intel-gfx] [PATCH 1/4] " Chris Wilson
2020-12-03 13:50 ` Chris Wilson

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=87a6ut3c5g.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.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.