From e30f5e661eaa9f6b6c33867075c3f78032bb858a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 20 Jul 2013 22:33:00 +0100 Subject: [PATCH] read-after-write --- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 8527ea0..2cb8319 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -623,16 +623,20 @@ static void update_mboxes(struct intel_ring_buffer *ring, u32 mmio_offset) { + struct pipe_control *pc = ring->private; + /* NB: In order to be able to do semaphore MBOX updates for varying number * of rings, it's easiest if we round up each individual update to a * multiple of 2 (since ring updates must always be a multiple of 2) * even though the actual update only requires 3 dwords. */ -#define MBOX_UPDATE_DWORDS 4 +#define MBOX_UPDATE_DWORDS 6 intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1)); intel_ring_emit(ring, mmio_offset); intel_ring_emit(ring, ring->outstanding_lazy_request); - intel_ring_emit(ring, MI_NOOP); + intel_ring_emit(ring, MI_STORE_REGISTER_MEM(1)); + intel_ring_emit(ring, mmio_offset); + intel_ring_emit(ring, pc->gtt_offset + 128); } /** -- 1.8.3.2