Re: [PATCH] drm/i915/gt: Only print an error if the resume fails after the reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>

> ---
>  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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux