[Intel-gfx] [PATCH] drm/i915: Include engine state on detecting a missed breadcrumb/seqno
Chris Wilson
chris at chris-wilson.co.uk
Wed Nov 8 10:12:52 UTC 2017
Quoting Chris Wilson (2017-11-08 10:07:46)
> 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.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
> drivers/gpu/drm/i915/intel_breadcrumbs.c | 11 +++++------
> drivers/gpu/drm/i915/intel_engine_cs.c | 6 ++++++
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> index 4de054f8c1ba..1e4d2978fb86 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);
Ugh, need to pass the fmt onto intel_engine_dump. Otherwise we end up
with this odd mixture of DRM_DEBUG_DRIVER and pr_debug. Alternatively,
we could make a drm_debug_driver_printer etc.
In this case, probably both.
-Chris
More information about the Intel-gfx
mailing list