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] drm/i915/gt: Only print an error if the resume fails after the reset
Date: Fri, 22 Jan 2021 13:17:28 +0200	[thread overview]
Message-ID: <87a6t1jk53.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20210121223902.7890-1-chris@chris-wilson.co.uk>

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

> If we fail to stop the ring before the reset, we try the reset anyway.
> Then we only report a failure if the engine fails to resume after the
> reset, therefore we don't need to print a premature error message during
> the prepare.

Resonable to only yell if we cant proceed.

>
> 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_ring_submission.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> index e4db4318f634..2d497ecdd433 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> @@ -333,8 +333,8 @@ static void reset_prepare(struct intel_engine_cs *engine)
>  	ENGINE_TRACE(engine, "\n");
>  	intel_engine_stop_cs(engine);
>  
> -	if (!stop_ring(engine)) {
> -		/* G45 ring initialization often fails to reset head to zero */
> +	/* G45 ring initialization often fails to reset head to zero */
> +	if (!stop_ring(engine) && !stop_ring(engine))
>  		ENGINE_TRACE(engine,
>  			     "HEAD not reset to zero, "
>  			     "{ CTL:%08x, HEAD:%08x, TAIL:%08x, START:%08x }\n",
> @@ -342,17 +342,6 @@ static void reset_prepare(struct intel_engine_cs *engine)
>  			     ENGINE_READ_FW(engine, RING_HEAD),
>  			     ENGINE_READ_FW(engine, RING_TAIL),
>  			     ENGINE_READ_FW(engine, RING_START));
> -		if (!stop_ring(engine)) {
> -			drm_err(&engine->i915->drm,
> -				"failed to set %s head to zero "
> -				"ctl %08x head %08x tail %08x start %08x\n",
> -				engine->name,
> -				ENGINE_READ_FW(engine, RING_CTL),
> -				ENGINE_READ_FW(engine, RING_HEAD),
> -				ENGINE_READ_FW(engine, RING_TAIL),
> -				ENGINE_READ_FW(engine, RING_START));
> -		}
> -	}
>  }
>  
>  static void reset_rewind(struct intel_engine_cs *engine, bool stalled)
> -- 
> 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

      parent reply	other threads:[~2021-01-22 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 22:39 [Intel-gfx] [PATCH] drm/i915/gt: Only print an error if the resume fails after the reset Chris Wilson
2021-01-22  4:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-01-22  8:10 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-01-22 11:17 ` Mika Kuoppala [this message]

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=87a6t1jk53.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.