Re: [PATCH v2] drm/i915: Include engine state on detecting a missed breadcrumb/seqno

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

 



Quoting Chris Wilson (2017-11-09 11:39:58)
> Now that we have a common engine state pretty printer, we can use that
> instead of the adhoc information printed when we miss a breadcrumb.
> 
> v2: Rearrange intel_engine_disarm_breadcrumbs() to avoid calling
> intel_engine_dump() under the rb spinlock (Mika) and to pretty-print the
> error state early so that we include the full list of waiters.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_breadcrumbs.c | 24 +++++++++++++-----------
>  drivers/gpu/drm/i915/intel_engine_cs.c   |  6 ++++++
>  2 files changed, 19 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> index 43cf227a51c2..918641a7c3f3 100644
> --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> @@ -64,12 +64,11 @@ static unsigned long wait_timeout(void)
>  
>  static noinline void missed_breadcrumb(struct intel_engine_cs *engine)
>  {
> -       DRM_DEBUG_DRIVER("%s missed breadcrumb at %pS, irq posted? %s, current seqno=%x, last=%x\n",
> -                        engine->name, __builtin_return_address(0),
> -                        yesno(test_bit(ENGINE_IRQ_BREADCRUMB,
> -                                       &engine->irq_posted)),
> -                        intel_engine_get_seqno(engine),
> -                        intel_engine_last_submit(engine));
> +       struct drm_printer p = drm_debug_printer(__func__);
> +
> +       DRM_DEBUG_DRIVER("%s missed breadcrumb at %pS\n",
> +                        engine->name, __builtin_return_address(0));
> +       intel_engine_dump(engine, &p);
>  
>         set_bit(engine->id, &engine->i915->gpu_error.missed_irq_rings);
>  }
> @@ -207,12 +206,16 @@ void intel_engine_unpin_breadcrumbs_irq(struct intel_engine_cs *engine)
>  void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine)
>  {
>         struct intel_breadcrumbs *b = &engine->breadcrumbs;
> -       struct intel_wait *wait, *n, *first;
> +       struct intel_wait *wait, *n;
>  
>         if (!b->irq_armed)
>                 return;
>  
> -       /* We only disarm the irq when we are idle (all requests completed),
> +       if (intel_engine_wakeup(engine) & ENGINE_WAKEUP_ASLEEP)
> +               missed_breadcrumb(engine);
> +
> +       /*
> +        * We only disarm the irq when we are idle (all requests completed),
>          * so if the bottom-half remains asleep, it missed the request
>          * completion.
>          */

Ugh, that comment should be attached to the intel_engine_wakeup()
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux