]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/i915: Insert a command barrier on BLT/BSD cache flushes
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Jan 2015 13:42:00 +0000 (13:42 +0000)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 14 Mar 2015 19:37:18 +0000 (15:37 -0400)
commit2de5e09aaf489002fc903c0c83e09e016f9584b0
treea3c9a75f4befe4c5fe5ec963f847b5da04db517a
parent93fd529dd1bc4263c9a993cc6172a257d7b90878
drm/i915: Insert a command barrier on BLT/BSD cache flushes

commit f0a1fb10e5f79f5aaf8d7e94b9fa6bf2fa9aeebf upstream.

This looked like an odd regression from

commit ec5cc0f9b019af95e4571a9fa162d94294c8d90b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jun 12 10:28:55 2014 +0100

    drm/i915: Restrict GPU boost to the RCS engine

but in reality it undercovered a much older coherency bug. The issue that
boosting the GPU frequency on the BCS ring was masking was that we could
wake the CPU up after completion of a BCS batch and inspect memory prior
to the write cache being fully evicted. In order to serialise the
breadcrumb interrupt (and so ensure that the CPU's view of memory is
coherent) we need to perform a post-sync operation in the MI_FLUSH_DW.

v2: Fix all the MI_FLUSH_DW (bsd plus the duplication in execlists).

Also fix the invalidate_domains mask in gen8_emit_flush() for ring !=
VCS.

Testcase: gpuX-rcs-gpu-read-after-write
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c