drm/i915: Flush pipecontrol post-sync writes
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Aug 2015 15:08:41 +0000 (16:08 +0100)
committerJani Nikula <jani.nikula@intel.com>
Tue, 13 Oct 2015 13:54:19 +0000 (16:54 +0300)
commit40a24488f5250d63341e74b9994159afc4589606
tree02c2dcd75d39a6585c77ceb40274794b6cd73096
parente797e4b71777877b19b50e3d736331c947ccffe7
drm/i915: Flush pipecontrol post-sync writes

In order to flush the results from in-batch pipecontrol writes (used for
example in glQuery) before declaring the batch complete (and so declaring
the query results coherent), we need to set the FlushEnable bit in our
flushing pipecontrol. The FlushEnable bit "waits until all previous
writes of immediate data from post-sync circles are complete before
executing the next command".

I get GPU hangs on byt without flushing these writes (running ue4).
piglit has examples where the flush is required for correct rendering.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c