diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-04-23 18:06:17 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-04-25 15:34:24 +0100 |
commit | 010018638659fbe8332c470e94750daf6ef4ab14 (patch) | |
tree | 01c2c92d0ea010d94c963d1636d8cb68d22e8480 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | e6ba9992de6c63fe86c028b4876338e1cb7dac34 (diff) | |
download | op-kernel-dev-010018638659fbe8332c470e94750daf6ef4ab14.zip op-kernel-dev-010018638659fbe8332c470e94750daf6ef4ab14.tar.gz |
drm/i915: Poison the request before emitting commands
If we poison the request before we emit commands, it should be easier to
spot when we execute an uninitialised request.
References: https://bugs.freedesktop.org/show_bug.cgi?id=100144
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170423170619.7156-2-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 227dfcf..6836efb 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1694,6 +1694,7 @@ u32 *intel_ring_begin(struct drm_i915_gem_request *req, int num_dwords) GEM_BUG_ON(ring->emit > ring->size - bytes); cs = ring->vaddr + ring->emit; + GEM_DEBUG_EXEC(memset(cs, POISON_INUSE, bytes)); ring->emit += bytes; ring->space -= bytes; GEM_BUG_ON(ring->space < 0); |