mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-27 12:32:50 +00:00
drm/i915: remove single-use GEM_DEBUG_EXEC()
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> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220504183716.987793-2-jani.nikula@intel.com
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user