drm/i915: Make sure DC writes are coherent on flush.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 14 Jan 2016 02:59:39 +0000 (18:59 -0800)
committerJani Nikula <jani.nikula@intel.com>
Fri, 29 Jan 2016 07:11:26 +0000 (09:11 +0200)
commit935a0ff0e1ea62a116848c0a187b13838f7b9cee
tree5398eb6bdc8437f56b35a4f45b4ed1abb470da98
parent92e963f50fc74041b5e9e744c330dca48e04f08d
drm/i915: Make sure DC writes are coherent on flush.

We need to set the DC FLUSH PIPE_CONTROL bit on Gen7+ to guarantee
that writes performed via the HDC are visible in memory.  Fixes an
intermittent failure in a Piglit test that writes to a BO from a
shader using GL atomic counters (implemented as HDC untyped atomics)
and then expects the memory to read back the same value after mapping
it on the CPU.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91298
Tested-by: Mark Janes <mark.a.janes@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1452740379-3194-1-git-send-email-currojerez@riseup.net
(cherry picked from commit 965fd602a6436f689f4f2fe40a6789582778ccd5)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c