From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915: remove single-use GEM_DEBUG_EXEC()
Date: Thu, 5 May 2022 12:04:14 +0100 [thread overview]
Message-ID: <b3dd1549-8c87-a275-b761-dcab80285f00@linux.intel.com> (raw)
In-Reply-To: <20220504183716.987793-2-jani.nikula@intel.com>
On 04/05/2022 19:37, Jani Nikula wrote:
> Reduce the magic of what's going on in GEM_DEBUG_EXEC() by expanding it
> inline and being explicit about it. It's as single use case anyway, so
> the macro feels overkill.
>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_ring.c | 3 ++-
> drivers/gpu/drm/i915/i915_gem.h | 2 --
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c
> index 40ffcb94e379..15ec64d881c4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring.c
> @@ -299,7 +299,8 @@ u32 *intel_ring_begin(struct i915_request *rq, unsigned int num_dwords)
> GEM_BUG_ON(ring->emit > ring->size - bytes);
> GEM_BUG_ON(ring->space < bytes);
> cs = ring->vaddr + ring->emit;
> - GEM_DEBUG_EXEC(memset32(cs, POISON_INUSE, bytes / sizeof(*cs)));
> + if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
> + memset32(cs, POISON_INUSE, bytes / sizeof(*cs));
> ring->emit += bytes;
> ring->space -= bytes;
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.h b/drivers/gpu/drm/i915/i915_gem.h
> index b7b257f54d2e..a2be323a4be5 100644
> --- a/drivers/gpu/drm/i915/i915_gem.h
> +++ b/drivers/gpu/drm/i915/i915_gem.h
> @@ -54,7 +54,6 @@ struct drm_i915_private;
> } while(0)
> #define GEM_WARN_ON(expr) WARN_ON(expr)
>
> -#define GEM_DEBUG_EXEC(expr) expr
> #define GEM_DEBUG_WARN_ON(expr) GEM_WARN_ON(expr)
>
> #else
> @@ -64,7 +63,6 @@ struct drm_i915_private;
> #define GEM_BUG_ON(expr) BUILD_BUG_ON_INVALID(expr)
> #define GEM_WARN_ON(expr) ({ unlikely(!!(expr)); })
>
> -#define GEM_DEBUG_EXEC(expr) do { } while (0)
> #define GEM_DEBUG_WARN_ON(expr) ({ BUILD_BUG_ON_INVALID(expr); 0; })
> #endif
>
Yeah one user after time passed suggests removing is the right course of
action.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
next prev parent reply other threads:[~2022-05-05 11:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 18:37 [Intel-gfx] [PATCH 1/3] drm/i915: remove unused GEM_DEBUG_DECL() and GEM_DEBUG_BUG_ON() Jani Nikula
2022-05-04 18:37 ` [Intel-gfx] [PATCH 2/3] drm/i915: remove single-use GEM_DEBUG_EXEC() Jani Nikula
2022-05-05 11:04 ` Tvrtko Ursulin [this message]
2022-05-10 9:24 ` Jani Nikula
2022-05-04 18:37 ` [Intel-gfx] [PATCH 3/3] drm/i915/display: stop using BUG() Jani Nikula
2022-05-05 11:07 ` Tvrtko Ursulin
2022-05-05 11:27 ` Jani Nikula
2022-05-04 22:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: remove unused GEM_DEBUG_DECL() and GEM_DEBUG_BUG_ON() Patchwork
2022-05-05 3:20 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-05-05 11:04 ` [Intel-gfx] [PATCH 1/3] " Tvrtko Ursulin
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=b3dd1549-8c87-a275-b761-dcab80285f00@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox