summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/intel_ring.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2022-05-04 21:37:15 +0300
committerJani Nikula <jani.nikula@intel.com>2022-05-09 14:16:29 +0300
commite9794c88cd6cf4be4a79188916a75539751f532c (patch)
treef31f041b8c2a829b74baef8c3fdc212cc097e9b3 /drivers/gpu/drm/i915/gt/intel_ring.c
parent1b93ff4d0679190e8812cd0d0b3aebfcba1ed883 (diff)
downloadlwn-e9794c88cd6cf4be4a79188916a75539751f532c.tar.gz
lwn-e9794c88cd6cf4be4a79188916a75539751f532c.zip
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
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_ring.c')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_ring.c3
1 files changed, 2 insertions, 1 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;