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
Subject: Re: [PATCH 13/18] drm/i915: Compile out engine debug for release
Date: Thu, 26 Apr 2018 13:15:06 +0300	[thread overview]
Message-ID: <87h8nyz32t.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20180409111413.6352-14-chris@chris-wilson.co.uk>

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

> The majority of the engine state dumping is too voluminous to be useful
> outside of a controlled setup, though a few do accompany severe errors.
> Keep the debug dumps next to the errors, but hide the others behind a CI
> compile flag. This becomes more useful when adding more dumps to latency
> sensitive paths.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

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

> ---
>  drivers/gpu/drm/i915/i915_gem.c          | 2 +-
>  drivers/gpu/drm/i915/i915_gem.h          | 6 ++++++
>  drivers/gpu/drm/i915/intel_breadcrumbs.c | 2 +-
>  drivers/gpu/drm/i915/intel_hangcheck.c   | 2 +-
>  4 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 42a387ff0eaa..cec52bbd1b41 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3267,7 +3267,7 @@ void i915_gem_set_wedged(struct drm_i915_private *i915)
>  
>  	GEM_TRACE("start\n");
>  
> -	if (drm_debug & DRM_UT_DRIVER) {
> +	if (GEM_SHOW_DEBUG()) {
>  		struct drm_printer p = drm_debug_printer(__func__);
>  
>  		for_each_engine(engine, i915, id)
> diff --git a/drivers/gpu/drm/i915/i915_gem.h b/drivers/gpu/drm/i915/i915_gem.h
> index deaf78d2ae8b..525920404ede 100644
> --- a/drivers/gpu/drm/i915/i915_gem.h
> +++ b/drivers/gpu/drm/i915/i915_gem.h
> @@ -30,6 +30,9 @@
>  struct drm_i915_private;
>  
>  #ifdef CONFIG_DRM_I915_DEBUG_GEM
> +
> +#define GEM_SHOW_DEBUG() (drm_debug & DRM_UT_DRIVER)
> +
>  #define GEM_BUG_ON(condition) do { if (unlikely((condition))) {	\
>  		pr_err("%s:%d GEM_BUG_ON(%s)\n", \
>  		       __func__, __LINE__, __stringify(condition)); \
> @@ -45,6 +48,9 @@ struct drm_i915_private;
>  #define GEM_DEBUG_BUG_ON(expr) GEM_BUG_ON(expr)
>  
>  #else
> +
> +#define GEM_SHOW_DEBUG() (0)
> +
>  #define GEM_BUG_ON(expr) BUILD_BUG_ON_INVALID(expr)
>  #define GEM_WARN_ON(expr) (BUILD_BUG_ON_INVALID(expr), 0)
>  
> diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> index ca0b04d9747c..ad761b8d843d 100644
> --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> @@ -82,7 +82,7 @@ static unsigned long wait_timeout(void)
>  
>  static noinline void missed_breadcrumb(struct intel_engine_cs *engine)
>  {
> -	if (drm_debug & DRM_UT_DRIVER) {
> +	if (GEM_SHOW_DEBUG()) {
>  		struct drm_printer p = drm_debug_printer(__func__);
>  
>  		intel_engine_dump(engine, &p,
> diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c b/drivers/gpu/drm/i915/intel_hangcheck.c
> index fd0ffb8328d0..309e38b00e95 100644
> --- a/drivers/gpu/drm/i915/intel_hangcheck.c
> +++ b/drivers/gpu/drm/i915/intel_hangcheck.c
> @@ -356,7 +356,7 @@ static void hangcheck_accumulate_sample(struct intel_engine_cs *engine,
>  		break;
>  
>  	case ENGINE_DEAD:
> -		if (drm_debug & DRM_UT_DRIVER) {
> +		if (GEM_SHOW_DEBUG()) {
>  			struct drm_printer p = drm_debug_printer("hangcheck");
>  			intel_engine_dump(engine, &p, "%s\n", engine->name);
>  		}
> -- 
> 2.17.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-04-26 10:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 11:13 Still trying for context->preempt_timeout Chris Wilson
2018-04-09 11:13 ` [PATCH 01/18] drm/i915/execlists: Set queue priority from secondary port Chris Wilson
2018-04-10 14:05   ` Tvrtko Ursulin
     [not found]     ` <152337025293.3167.10189866034675290387@mail.alporthouse.com>
2018-04-10 14:42       ` Tvrtko Ursulin
2018-04-10 14:56         ` Chris Wilson
2018-04-10 15:08           ` Chris Wilson
     [not found]           ` <87af1b35-ba87-f560-c911-0e758a164909@linux.intel.com>
     [not found]             ` <152344296759.13225.4187833354912190018@mail.alporthouse.com>
     [not found]               ` <aa0e24bb-045c-e1c9-24bc-6dba0b4a28b8@linux.intel.com>
2018-04-11 11:33                 ` Chris Wilson
2018-04-09 11:13 ` [PATCH 02/18] drm/i915/execlists: Refactor out complete_preempt_context() Chris Wilson
2018-04-09 11:13 ` [PATCH 03/18] drm/i915: Move engine reset prepare/finish to backends Chris Wilson
2018-04-09 11:13 ` [PATCH 04/18] drm/i915: Split execlists/guc reset preparations Chris Wilson
2018-04-09 11:14 ` [PATCH 05/18] drm/i915/execlists: Flush pending preemption events during reset Chris Wilson
2018-04-09 11:14 ` [PATCH 06/18] drm/i915/breadcrumbs: Keep the fake irq armed across reset Chris Wilson
2018-04-23 13:03   ` Mika Kuoppala
2018-04-23 14:53     ` Chris Wilson
2018-04-24 11:06       ` Mika Kuoppala
2018-04-09 11:14 ` [PATCH 07/18] drm/i915: Combine tasklet_kill and tasklet_disable Chris Wilson
2018-04-24 12:26   ` Mika Kuoppala
2018-04-24 12:28     ` Chris Wilson
2018-04-26 10:19       ` Mika Kuoppala
2018-04-26 10:26         ` Chris Wilson
2018-04-09 11:14 ` [PATCH 08/18] drm/i915: Stop parking the signaler around reset Chris Wilson
2018-04-09 11:14 ` [PATCH 09/18] drm/i915: Be irqsafe inside reset Chris Wilson
2018-04-09 11:14 ` [PATCH 10/18] drm/i915/execlists: Make submission tasklet hardirq safe Chris Wilson
2018-04-09 11:14 ` [PATCH 11/18] drm/i915/guc: " Chris Wilson
2018-04-09 11:14 ` [PATCH 12/18] drm/i915: Allow init_breadcrumbs to be used from irq context Chris Wilson
2018-04-09 11:14 ` [PATCH 13/18] drm/i915: Compile out engine debug for release Chris Wilson
2018-04-26 10:15   ` Mika Kuoppala [this message]
2018-04-09 11:14 ` [PATCH 14/18] drm/i915/execlists: Force preemption via reset on timeout Chris Wilson
2018-04-09 11:14 ` [PATCH 15/18] drm/i915/execlists: Try preempt-reset from hardirq timer context Chris Wilson
2018-04-09 11:14 ` [PATCH 16/18] drm/i915/preemption: Select timeout when scheduling Chris Wilson
2018-04-09 11:14 ` [PATCH 17/18] drm/i915: Use a preemption timeout to enforce interactivity Chris Wilson
2018-04-09 11:14 ` [PATCH 18/18] drm/i915: Allow user control over preempt timeout on their important context Chris Wilson
2018-04-09 11:29 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/18] drm/i915/execlists: Set queue priority from secondary port Patchwork
2018-04-09 11:44 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-09 13:08 ` ✗ Fi.CI.IGT: failure " Patchwork

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